ReactOS 0.4.15-dev-7994-gb388cb6
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 */
20extern DWORD tls_index;
21
22struct __thread_data {
23 DWORD tid;
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
60extern BOOL msvcrt_init_tls(void);
61extern BOOL msvcrt_free_tls(void);
63extern 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 */
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
void(__cdecl * _se_translator_function)(unsigned int, struct _EXCEPTION_POINTERS *)
Definition: eh.h:25
void(__cdecl * unexpected_function)(void)
Definition: eh.h:21
void(__cdecl * terminate_function)(void)
Definition: eh.h:19
void msvcrt_free_tls_mem(void)
Definition: tls.c:51
DWORD tls_index
BOOL msvcrt_free_tls(void)
Definition: tls.c:21
BOOL msvcrt_init_tls(void)
Definition: tls.c:9
thread_data_t * msvcrt_get_thread_data(void)
Definition: tls.c:31
char * tmpnam_buffer
Definition: msvcrt.h:173
char * strtok_next
Definition: msvcrt.h:168
EXCEPTION_POINTERS * xcptinfo
Definition: tls.h:43
struct MSVCRT_threadmbcinfostruct * mbcinfo
Definition: tls.h:45
unsigned char * mbstok_next
Definition: msvcrt.h:170
void * unk6[3]
Definition: msvcrt.h:190
wchar_t * wcstok_next
Definition: tls.h:30
wchar_t * wasctime_buffer
Definition: tls.h:38
wchar_t * wcserror_buffer
Definition: tls.h:33
void * unk8[100]
Definition: msvcrt.h:193
_se_translator_function se_translator
Definition: tls.h:51
struct tm * time_buffer
Definition: tls.h:39
BOOL have_locale
Definition: msvcrt.h:185
EXCEPTION_RECORD * exc_record
Definition: msvcrt.h:192
int thread_errno
Definition: msvcrt.h:164
wchar_t * wtmpnam_buffer
Definition: tls.h:35
int unk5[1]
Definition: msvcrt.h:186
char * strerror_buffer
Definition: msvcrt.h:171
unsigned long thread_doserrno
Definition: tls.h:26
int fpecode
Definition: msvcrt.h:182
HANDLE handle
Definition: msvcrt.h:163
unsigned int random_seed
Definition: msvcrt.h:167
DWORD tid
Definition: msvcrt.h:162
char * asctime_buffer
Definition: msvcrt.h:176
terminate_function terminate_handler
Definition: tls.h:49
struct MSVCRT_threadlocaleinfostruct * locinfo
Definition: tls.h:46
char * efcvt_buffer
Definition: msvcrt.h:179
unexpected_function unexpected_handler
Definition: tls.h:50
int unk3[2]
Definition: msvcrt.h:180
void * unk4[4]
Definition: msvcrt.h:181
void * unk2[2]
Definition: msvcrt.h:175
Definition: time.h:68