3 #ifndef __MSVCRT_INTERNAL_TLS_H
4 #define __MSVCRT_INTERNAL_TLS_H
6 #include <msvcrt/crttypes.h>
7 #include <msvcrt/stddef.h>
10 typedef struct _ThreadData
12 int terrno; /* *nix error code */
13 unsigned long tdoserrno; /* Win32 error code (for I/O only) */
14 unsigned LONGLONG tnext; /* used by rand/srand */
16 char *lasttoken; /* used by strtok */
17 wchar_t *wlasttoken; /* used by wcstok */
20 int fpecode; /* fp exception code */
23 int (*qcmp)(const void *, const void *); /* the comparison routine */
24 int qsz; /* size of each record */
25 int thresh; /* THRESHold in chars */
26 int mthresh; /* MTHRESHold in chars */
28 EXCEPTION_RECORD *exc_record; /* Head of exception record list */
30 } THREADDATA, *PTHREADDATA;
33 int CreateThreadData(void);
34 void DestroyThreadData(void);
36 void FreeThreadData(PTHREADDATA ptd);
37 PTHREADDATA GetThreadData(void);
39 #endif /* __MSVCRT_INTERNAL_TLS_H */