ReactOS  0.4.14-dev-115-g4576127
tls.h
Go to the documentation of this file.
1 /* tls.h */
2 
3 #ifndef __CRT_INTERNAL_TLS_H
4 #define __CRT_INTERNAL_TLS_H
5 
6 #ifndef _CRT_PRECOMP_H
7 #error DO NOT INCLUDE THIS HEADER DIRECTLY
8 #endif
9 
10 #include <stddef.h>
11 #include <time.h>
12 #include <locale.h>
13 #include <windef.h>
14 #include <winbase.h>
15 #include <winnt.h>
16 
17 #include <internal/wine/eh.h>
18 
19 /* TLS data */
20 extern DWORD tls_index;
21 
22 struct __thread_data {
23  DWORD tid;
24  HANDLE handle;
25  int thread_errno;
26  unsigned long thread_doserrno;
27  int unk1;
28  unsigned int random_seed; /* seed for rand() */
29  char *strtok_next; /* next ptr for strtok() */
30  wchar_t *wcstok_next; /* next ptr for wcstok() */
31  unsigned char *mbstok_next; /* next ptr for mbstok() */
32  char *strerror_buffer; /* buffer for strerror */
33  wchar_t *wcserror_buffer; /* buffer for wcserror */
34  char *tmpnam_buffer; /* buffer for tmpname() */
35  wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */
36  void *unk2[2];
37  char *asctime_buffer; /* buffer for asctime */
38  wchar_t *wasctime_buffer; /* buffer for wasctime */
39  struct tm *time_buffer; /* buffer for localtime/gmtime */
40  char *efcvt_buffer; /* buffer for ecvt/fcvt */
41  int unk3[2];
42  void *unk4[3];
44  int fpecode;
48  int unk5[1];
52  void *unk6[3];
53  int unk7;
55  void *unk8[100];
56 };
57 
59 
60 extern BOOL msvcrt_init_tls(void);
61 extern BOOL msvcrt_free_tls(void);
63 extern void msvcrt_free_tls_mem(void);
64 
65 #define MSVCRT_ENABLE_PER_THREAD_LOCALE 1
66 #define MSVCRT_DISABLE_PER_THREAD_LOCALE 2
67 
68 #endif /* __MSVCRT_INTERNAL_TLS_H */
69 
70 /* EOF */
EXCEPTION_POINTERS * xcptinfo
Definition: tls.h:43
unexpected_function unexpected_handler
Definition: tls.h:50
void * unk8[100]
Definition: msvcrt.h:193
struct tm * time_buffer
Definition: tls.h:39
wchar_t * wasctime_buffer
Definition: tls.h:38
void msvcrt_free_tls_mem(void)
Definition: tls.c:51
char * tmpnam_buffer
Definition: msvcrt.h:173
unsigned char * mbstok_next
Definition: msvcrt.h:170
struct MSVCRT_threadmbcinfostruct * mbcinfo
Definition: tls.h:45
int unk5[1]
Definition: msvcrt.h:186
BOOL msvcrt_free_tls(void)
Definition: tls.c:21
DWORD tid
Definition: msvcrt.h:162
int fpecode
Definition: msvcrt.h:182
unsigned int BOOL
Definition: ntddk_ex.h:94
void * unk2[2]
Definition: msvcrt.h:175
struct MSVCRT_threadlocaleinfostruct * locinfo
Definition: tls.h:46
void * unk4[4]
Definition: msvcrt.h:181
void(__cdecl * unexpected_function)(void)
Definition: eh.h:21
terminate_function terminate_handler
Definition: tls.h:49
unsigned long thread_doserrno
Definition: tls.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
int thread_errno
Definition: msvcrt.h:164
void(__cdecl * terminate_function)(void)
Definition: eh.h:19
BOOL msvcrt_init_tls(void)
Definition: tls.c:9
char * strtok_next
Definition: msvcrt.h:168
void(* _se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info)
Definition: eh.h:44
wchar_t * wtmpnam_buffer
Definition: tls.h:35
Definition: time.h:76
char * asctime_buffer
Definition: msvcrt.h:176
char * efcvt_buffer
Definition: msvcrt.h:179
BOOL have_locale
Definition: msvcrt.h:185
HANDLE handle
Definition: msvcrt.h:163
wchar_t * wcserror_buffer
Definition: tls.h:33
void * unk6[3]
Definition: msvcrt.h:190
thread_data_t * msvcrt_get_thread_data(void)
Definition: tls.c:31
EXCEPTION_RECORD * exc_record
Definition: msvcrt.h:192
wchar_t * wcstok_next
Definition: tls.h:30
int unk3[2]
Definition: msvcrt.h:180
_se_translator_function se_translator
Definition: tls.h:51
unsigned int random_seed
Definition: msvcrt.h:167
DWORD tls_index
char * strerror_buffer
Definition: msvcrt.h:171