ReactOS 0.4.16-dev-2110-ge3521eb
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 msvcrt_free_tls_mem(void)
Definition: tls.c:53
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: thread.c:45
void(__cdecl * _se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info)
Definition: msvcrt.h:48
void(__cdecl * unexpected_function)(void)
Definition: msvcrt.h:47
void(__cdecl * terminate_function)(void)
Definition: msvcrt.h:46
char * tmpnam_buffer
Definition: msvcrt.h:188
char * strtok_next
Definition: msvcrt.h:183
EXCEPTION_POINTERS * xcptinfo
Definition: msvcrt.h:197
struct MSVCRT_threadmbcinfostruct * mbcinfo
Definition: tls.h:45
unsigned char * mbstok_next
Definition: msvcrt.h:185
_se_translator_function se_translator
Definition: msvcrt.h:205
BOOL have_locale
Definition: msvcrt.h:185
void * unk8[6]
Definition: msvcrt.h:211
EXCEPTION_RECORD * exc_record
Definition: msvcrt.h:207
int thread_errno
Definition: msvcrt.h:179
int unk5[1]
Definition: msvcrt.h:202
char * strerror_buffer
Definition: msvcrt.h:186
unsigned long thread_doserrno
Definition: tls.h:26
int fpecode
Definition: msvcrt.h:198
HANDLE handle
Definition: msvcrt.h:178
struct tm * time_buffer
Definition: msvcrt.h:193
unsigned int random_seed
Definition: msvcrt.h:182
DWORD tid
Definition: msvcrt.h:177
char * asctime_buffer
Definition: msvcrt.h:191
terminate_function terminate_handler
Definition: msvcrt.h:203
struct MSVCRT_threadlocaleinfostruct * locinfo
Definition: tls.h:46
wchar_t * wcserror_buffer
Definition: msvcrt.h:187
wchar_t * wasctime_buffer
Definition: msvcrt.h:192
char * efcvt_buffer
Definition: msvcrt.h:194
void * unk4[3]
Definition: msvcrt.h:196
unexpected_function unexpected_handler
Definition: msvcrt.h:204
int unk3[2]
Definition: msvcrt.h:195
wchar_t * wcstok_next
Definition: msvcrt.h:184
wchar_t * wtmpnam_buffer
Definition: msvcrt.h:189
void * unk2[2]
Definition: msvcrt.h:190
void * unk6
Definition: msvcrt.h:206