4 * Copyright 1995 Alexandre Julliard
16 /* Process database (i.e. a normal DOS PSP) */
20 WORD int20
; /* int 20h instruction */
21 WORD nextParagraph
; /* Segment of next paragraph */
23 BYTE dispatcher
[5]; /* Long call to DOS */
24 DWORD savedint22
; /* Saved int 22h handler */
25 DWORD savedint23
; /* Saved int 23h handler */
26 DWORD savedint24
; /* Saved int 24h handler */
27 WORD parentPSP
; /* Selector of parent PSP */
28 BYTE fileHandles
[20]; /* Open file handles */
29 HANDLE environment
; /* Selector of environment */
31 BYTE fcb1
[16]; /* First FCB */
32 BYTE fcb2
[20]; /* Second FCB */
33 BYTE cmdLine
[128]; /* Command-line (first byte is length) */
37 /* Segment containing MakeProcInstance() thunks */
40 WORD next
; /* Selector of next segment */
41 WORD magic
; /* Thunks signature */
43 WORD free
; /* Head of the free list */
44 WORD thunks
[4]; /* Each thunk is 4 words long */
47 #define THUNK_MAGIC ('P' | ('T' << 8))
50 /* Task database. See 'Windows Internals' p. 226 */
53 HTASK hNext
; /* Selector of next TDB */
54 WORD sp
; /* Stack pointer of task */
55 WORD ss
; /* Stack segment of task */
56 WORD nEvents
; /* Events for this task */
57 char priority
; /* Task priority, between -32 and 15 */
59 HGLOBAL hStack32
; /* Handle to 32-bit stack */
60 WORD hSelf
; /* Selector of this TDB */
62 DWORD esp
; /* 32-bit stack pointer */
63 WORD ctrlword8087
; /* 80x87 control word */
64 WORD flags
; /* Task flags */
65 WORD error_flags
; /* Error handling flags */
66 WORD version
; /* Expected Windows version */
67 HANDLE hInstance
; /* Instance handle for this task */
68 HMODULE hModule
; /* Module handle */
69 HANDLE hQueue
; /* Selector of task message queue */
70 HTASK hParent
; /* Selector of TDB of parent task */
71 WORD signal_flags
; /* Flags related to signal handler */
72 DWORD sighandler WINE_PACKED
; /* Signal handler */
73 DWORD userhandler WINE_PACKED
; /* USER signal handler */
74 DWORD discardhandler WINE_PACKED
; /* Handler for GlobalDiscard() */
75 DWORD int0 WINE_PACKED
; /* int 0 (divide by zero) handler */
76 DWORD int2 WINE_PACKED
; /* int 2 (NMI) handler */
77 DWORD int4 WINE_PACKED
; /* int 4 (INTO) handler */
78 DWORD int6 WINE_PACKED
; /* int 6 (invalid opcode) handler */
79 DWORD int7 WINE_PACKED
; /* int 7 (coprocessor) handler */
80 DWORD int3e WINE_PACKED
; /* int 3e (80x87 emulator) handler */
81 DWORD int75 WINE_PACKED
; /* int 75 (80x87 error) handler */
82 DWORD compat_flags WINE_PACKED
; /* Compatibility flags */
84 HANDLE hPDB
; /* Selector of PDB (i.e. PSP) */
85 DWORD dta WINE_PACKED
; /* Current DTA */
86 BYTE curdrive
; /* Current drive */
87 BYTE curdir
[65]; /* Current directory */
89 HTASK hYieldTo
; /* Next task to schedule */
90 DWORD dlls_to_init
; /* Ptr to list of DLL to initialize */
91 HANDLE hCSAlias
; /* Code segment alias for this TDB */
92 THUNKS thunks WINE_PACKED
; /* Make proc instance thunks */
93 WORD more_thunks
[6*4]; /* Space for 6 more thunks */
94 BYTE module_name
[8]; /* Module name for task */
95 WORD magic
; /* TDB signature */
97 PDB pdb
; /* PDB for this task */
100 #define TDB_MAGIC ('T' | ('D' << 8))
103 #define TDBF_WINOLDAP 0x0001
104 #define TDBF_OS2APP 0x0008
105 #define TDBF_WIN32S 0x0010
111 /* TASK_Reschedule() 16-bit entry point */
112 extern FARPROC RELAY_RescheduleProcAddr
;
114 #endif /* _WINE_TASK_H */