4adcc83f236d0dc135a5ee937318c0163e134413
[reactos.git] / reactos / lib / crt / include / internal / tls.h
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 <stdarg.h>
11
12 #include <windef.h>
13 #include <winbase.h>
14 #include <winnt.h>
15
16 #include <stddef.h>
17
18 typedef struct _ThreadData
19 {
20 int terrno; /* *nix error code */
21 unsigned long tdoserrno; /* Win32 error code (for I/O only) */
22 unsigned __int64 tnext; /* used by rand/srand */
23
24 char *lasttoken; /* used by strtok */
25 wchar_t *wlasttoken; /* used by wcstok */
26
27
28 int fpecode; /* fp exception code */
29
30 /* qsort variables */
31 int (*qcmp)(const void *, const void *); /* the comparison routine */
32 int qsz; /* size of each record */
33 int thresh; /* THRESHold in chars */
34 int mthresh; /* MTHRESHold in chars */
35
36 EXCEPTION_RECORD *exc_record; /* Head of exception record list */
37
38 } THREADDATA, *PTHREADDATA;
39
40
41 int CreateThreadData(void);
42 void DestroyThreadData(void);
43
44 void FreeThreadData(PTHREADDATA ptd);
45 PTHREADDATA GetThreadData(void);
46
47 #endif /* __MSVCRT_INTERNAL_TLS_H */
48
49 /* EOF */
50