branch update for HEAD-2003050101
[reactos.git] / include / msvcrt / internal / tls.h
1 /* tls.h */
2
3 #ifndef __MSVCRT_INTERNAL_TLS_H
4 #define __MSVCRT_INTERNAL_TLS_H
5
6 #include <msvcrt/crttypes.h>
7 #include <msvcrt/stddef.h>
8 #include <windows.h>
9
10 typedef struct _ThreadData
11 {
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 */
15
16   char *lasttoken;              /* used by strtok */
17   wchar_t *wlasttoken;          /* used by wcstok */
18
19
20   int fpecode;                  /* fp exception code */
21
22   /* qsort variables */
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 */
27
28   EXCEPTION_RECORD *exc_record; /* Head of exception record list */
29
30 } THREADDATA, *PTHREADDATA;
31
32
33 int CreateThreadData(void);
34 void DestroyThreadData(void);
35
36 void FreeThreadData(PTHREADDATA ptd);
37 PTHREADDATA GetThreadData(void);
38
39 #endif /* __MSVCRT_INTERNAL_TLS_H */
40
41 /* EOF */
42