4 * Copyright 1996 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_THREAD_H
22 #define __WINE_THREAD_H
31 #ifndef WINE_TEB_DEFINED
32 #define WINE_TEB_DEFINED
35 NT_TIB Tib
; /* 12- 00 Thread information block */
36 PVOID EnvironmentPointer
; /* 12- 1c EnvironmentPointer (win95: tib flags + win16 mutex count) */
37 CLIENT_ID ClientId
; /* -2- 20 Process and thread id (win95: debug context) */
38 PVOID ActiveRpcHandle
; /* 028 */
39 PVOID ThreadLocalStoragePointer
; /* 02c Pointer to TLS array */
40 PEB
*Peb
; /* 030 owning process PEB */
41 DWORD LastErrorValue
; /* 034 Last error code */
42 ULONG CountOfOwnedCriticalSections
; /* 038 */
43 PVOID CsrClientThread
; /* 03c */
44 PVOID Win32ThreadInfo
; /* 040 */
45 ULONG Win32ClientInfo
[0x1f]; /* 044 */
46 PVOID WOW32Reserved
; /* 0c0 */
47 ULONG CurrentLocale
; /* 0c4 */
48 ULONG FpSoftwareStatusRegister
; /* 0c8 */
49 PVOID SystemReserved1
[54]; /* 0cc */
50 LONG ExceptionCode
; /* 1a4 */
51 ACTIVATION_CONTEXT_STACK ActivationContextStack
; /* 1a8 */
52 BYTE SpareBytes1
[24]; /* 1bc */
53 PVOID SystemReserved2
[10]; /* 1d4 */
55 /* The following are Wine-specific fields (NT: GdiTebBatch) */
56 DWORD dpmi_vif
; /* 1fc protected mode virtual interrupt flag */
57 ULONG_PTR vm86_pending
; /* 200 data for vm86 mode */
58 /* here is plenty space for wine specific fields (don't forget to change pad6!!) */
59 DWORD pad6
[310]; /* 204 */
61 ULONG gdiRgn
; /* 6dc */
62 ULONG gdiPen
; /* 6e0 */
63 ULONG gdiBrush
; /* 6e4 */
64 CLIENT_ID RealClientId
; /* 6e8 */
65 HANDLE GdiCachedProcessHandle
; /* 6f0 */
66 ULONG GdiClientPID
; /* 6f4 */
67 ULONG GdiClientTID
; /* 6f8 */
68 PVOID GdiThreadLocaleInfo
; /* 6fc */
69 PVOID UserReserved
[5]; /* 700 */
70 PVOID glDispachTable
[280]; /* 714 */
71 ULONG glReserved1
[26]; /* b74 */
72 PVOID glReserved2
; /* bdc */
73 PVOID glSectionInfo
; /* be0 */
74 PVOID glSection
; /* be4 */
75 PVOID glTable
; /* be8 */
76 PVOID glCurrentRC
; /* bec */
77 PVOID glContext
; /* bf0 */
78 ULONG LastStatusValue
; /* bf4 */
79 UNICODE_STRING StaticUnicodeString
; /* bf8 */
80 WCHAR StaticUnicodeBuffer
[261]; /* c00 */
81 PVOID DeallocationStack
; /* e0c */
82 PVOID TlsSlots
[64]; /* e10 */
83 LIST_ENTRY TlsLinks
; /* f10 */
85 PVOID ReservedForNtRpc
; /* f1c */
86 PVOID DbgSsReserved
[2]; /* f20 */
87 ULONG HardErrorDisabled
; /* f28 */
88 PVOID Instrumentation
[16]; /* f2c */
89 PVOID WinSockData
; /* f6c */
90 ULONG GdiBatchCount
; /* f70 */
91 ULONG Spare2
; /* f74 */
92 ULONG Spare3
; /* f78 */
93 ULONG Spare4
; /* f7c */
94 PVOID ReservedForOle
; /* f80 */
95 ULONG WaitingOnLoaderLock
; /* f84 */
96 PVOID Reserved5
[3]; /* f88 */
97 PVOID
*TlsExpansionSlots
; /* f94 */
99 #endif /* WINE_TEB_DEFINED */
102 /* The thread information for 16-bit threads */
103 /* NtCurrentTeb()->SubSystemTib points to this */
106 void *unknown
; /* 00 unknown */
107 UNICODE_STRING
*exe_name
; /* 04 exe module name */
109 /* the following fields do not exist under Windows */
110 UNICODE_STRING exe_str
; /* exe name string pointed to by exe_name */
111 CURDIR curdir
; /* current directory */
112 WCHAR curdir_buffer
[MAX_PATH
];
113 } WIN16_SUBSYSTEM_TIB
;
115 #endif /* __WINE_THREAD_H */