|
|
1.1 root 1: #ifndef _IRQ32_DOT_H
2: #define _IRQ32_DOT_H
3:
4: /*
5: * _IRQ386.H 5.20A June 8, 1995
6: *
7: * The Greenleaf Comm Library
8: *
9: * Copyright (C) 1984-1995 Greenleaf Software Inc. All Rights Reserved.
10: *
11: * NOTES
12: *
13: * This file contains all the structures and constants used by
14: * the 32 bit IRQ Manager internal functions. End users should never
15: * have to include this file in any of their source modules.
16: *
17: * MODIFICATIONS
18: *
19: * December 1, 1994 5.10A : Initial release.
20: *
21: */
22:
23: #define MAXIMUM_HANDLERS 10
24:
25: #pragma pack( 1 )
26:
27: typedef struct _tag_irqdata {
28: GF_FARPTR32 old_handler;
29: GF_FARPTR16 old_real_handler;
30: GF_FARPTR32 handler;
31: GF_FARPTR16 real_handler;
32: GF_FARPTR32 handler_data;
33: GF_FARPTR16 real_handler_data;
34: void ( GF_CONV *tear_down_function )( GF_FARPTR32 data );
35: int interrupt_number;
36: int saved_8259_bit;
37: int primary_8259;
38: int secondary_8259;
39: int mask_8259;
40: int int_count;
41: int real_int_count;
42: } IRQDATA;
43:
44: #pragma pack()
45:
46: #ifdef __cplusplus
47: extern "C" {
48: #endif
49:
50: int GF_CONV HookInterrupt( int interrupt_number,
51: void ( GF_CDECL *handler )( GF_FARPTR32 data ),
52: GF_FARPTR16 real_handler,
53: GF_FARPTR32 handler_data,
54: void ( GF_CONV *tear_down_function ) ( GF_FARPTR32 data ),
55: int primary_8259,
56: int secondary_8259,
57: int mask_8259 );
58: int GF_CONV UnHookInterrupt( int interrupt_number );
59: GF_FARPTR32 GF_CONV _GetInterruptData( int interrupt_number );
60: int GF_CONV RelocateIsrData( void );
61:
62: #ifdef __cplusplus
63: }
64: #endif
65:
66: /*
67: * These two extern definitions are really important. When
68: * the 32 bit IRQ manager is initialized, it relocates the real portion
69: * of the IRQ manager, plus the table of IRQDATA blocks down to
70: * a block of real memory. Thse two pointers let everyone else
71: * know where that memory block is.
72: */
73:
74: extern GF_FARPTR16 RealBlockPtr16;
75: extern GF_FARPTR32 RealBlockPtr32;
76: /*
77: * Anything that is stored in the reloacted real section of memory
78: * can't be addressed directly. Instead, we calculate an offset
79: * into the real mode segment by subtracting _SegmentStartRR16. It
80: * is the first address in the real segment. The next value defined
81: * here marks the end of the relocated real segment. We only need it
82: * so we can figure out how much memory to relocate.
83: */
84:
85: extern char _SegmentStartRR16;
86: extern char _SegmentEndRR16;
87:
88: /*
89: * This is a dummy stub real mode interrupt that I use
90: * to handle Ctrl-Break and Ctrl-C in real mode under PowerPack.
91: *
92: */
93:
94: void GF_CDECL _RealIret( GF_FARPTR16 int_flag );
95: void GF_CDECL kbd_int_handler( GF_FARPTR32 data );
96:
97:
98: #endif /* #ifndef _IRQ32_DOT_H */
99:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.