Watt-32 tcp/ip  2.2 dev-rel.10
wdpmi.h
Go to the documentation of this file.
1 
3 #ifndef _w32_WDPMI_H
4 #define _w32_WDPMI_H
5 
6 #if defined(WATCOM386)
7  extern BOOL dpmi_init (void);
8 #endif
9 
10 #if (DOSX & (DOS4GW|POWERPAK))
11 
12  #include "misc.h" /* IREGS */
13  #include <sys/pack_on.h>
14 
15  struct FAULT_STRUC { /* Exception structure (only used by CauseWay) */
16  DWORD ebp, edi, esi, edx, ecx, ebx, eax;
17  WORD gs, fs, es, ds;
18  DWORD eip;
19  WORD cs, reserved1;
20  DWORD eflags, esp;
21  WORD ss, reserved2;
22  WORD tr;
23  DWORD cr0, cr1, cr2, cr3;
24  DWORD csAddr;
25  DWORD dsAddr;
26  DWORD esAddr;
27  DWORD fsAddr;
28  DWORD gsAddr;
29  DWORD ssAddr;
30  WORD fault_num;
31  DWORD code;
32  BOOL mode; /* 0: exception in pmode, 1: real-mode */
33  };
34 
35  #include <sys/pack_off.h>
36 
37  #define SEG_OFS_TO_LIN(seg,ofs) (void*)(((WORD)(seg) << 4) + (WORD)(ofs))
38 
39  extern WORD __dpmi_errno;
40 
41  extern WORD dpmi_real_malloc (WORD size, WORD *sel);
42  extern int dpmi_real_free (WORD selector);
43  extern int dpmi_get_base_address(WORD sel, DWORD *base);
44  extern int dpmi_lock_region (void *address, unsigned length);
45  extern int dpmi_unlock_region (void *address, unsigned length);
46  extern void *dpmi_get_real_vector (int intr);
47  extern int dpmi_real_interrupt (int intr, IREGS *reg);
48  extern int dpmi_real_call_retf (IREGS *reg);
49 #endif
50 
51 #if (DOSX & DOS4GW)
52  extern BOOL dpmi_is_wdosx (void);
53  extern BOOL dpmi_is_pmodew (void);
54  extern BOOL dpmi_is_dos32a (void);
55  extern BOOL dpmi_is_dos4gw (void);
56  extern BOOL dpmi_is_causeway (void);
57  extern BOOL dpmi_is_hxdos (void);
58 
59  typedef void (*exceptionHook) (const struct FAULT_STRUC *);
60 
61  extern int dpmi_except_handler (exceptionHook exc_func);
62  extern const char *dos4gw_extender_name (void);
63 
64  #define stack_rewind W32_NAMESPACE (stack_rewind)
65  extern void stack_rewind (DWORD start, DWORD base);
66 #endif
67 
68 #endif /* !_w32_WDPMI_H */
69 
Definition: register.h:160
Definition: zinftree.h:24
Definition: esp.h:48
Definition: misc.h:511