ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

tls.h
Go to the documentation of this file.
00001 /* tls.h */
00002 
00003 #ifndef __CRT_INTERNAL_TLS_H
00004 #define __CRT_INTERNAL_TLS_H
00005 
00006 #ifndef _CRT_PRECOMP_H
00007 #error DO NOT INCLUDE THIS HEADER DIRECTLY
00008 #endif
00009 
00010 #include <stddef.h>
00011 #include <time.h>
00012 #include <locale.h>
00013 #include <windef.h>
00014 #include <winbase.h>
00015 #include <winnt.h>
00016 
00017 #include <internal/wine/eh.h>
00018 
00019 typedef struct MSVCRT_threadlocaleinfostruct {
00020     int refcount;
00021     unsigned int lc_codepage;
00022     unsigned int lc_collate_cp;
00023     unsigned long lc_handle[6];
00024     LC_ID lc_id[6];
00025     struct {
00026         char *locale;
00027         wchar_t *wlocale;
00028         int *refcount;
00029         int *wrefcount;
00030     } lc_category[6];
00031     int lc_clike;
00032     int mb_cur_max;
00033     int *lconv_intl_refcount;
00034     int *lconv_num_refcount;
00035     int *lconv_mon_refcount;
00036     struct MSVCRT_lconv *lconv;
00037     int *ctype1_refcount;
00038     unsigned short *ctype1;
00039     unsigned short *pctype;
00040     unsigned char *pclmap;
00041     unsigned char *pcumap;
00042     struct __lc_time_data *lc_time_curr;
00043 } MSVCRT_threadlocinfo;
00044 
00045 typedef struct MSVCRT_threadmbcinfostruct {
00046     int refcount;
00047     int mbcodepage;
00048     int ismbcodepage;
00049     int mblcid;
00050     unsigned short mbulinfo[6];
00051     char mbctype[257];
00052     char mbcasemap[256];
00053 } MSVCRT_threadmbcinfo;
00054 
00055 struct MSVCRT_lconv {
00056     char* decimal_point;
00057     char* thousands_sep;
00058     char* grouping;
00059     char* int_curr_symbol;
00060     char* currency_symbol;
00061     char* mon_decimal_point;
00062     char* mon_thousands_sep;
00063     char* mon_grouping;
00064     char* positive_sign;
00065     char* negative_sign;
00066     char int_frac_digits;
00067     char frac_digits;
00068     char p_cs_precedes;
00069     char p_sep_by_space;
00070     char n_cs_precedes;
00071     char n_sep_by_space;
00072     char p_sign_posn;
00073     char n_sign_posn;
00074 };
00075 
00076 typedef struct MSVCRT_threadlocaleinfostruct *MSVCRT_pthreadlocinfo;
00077 typedef struct MSVCRT_threadmbcinfostruct *MSVCRT_pthreadmbcinfo;
00078 
00079 typedef struct MSVCRT_localeinfo_struct
00080 {
00081     MSVCRT_pthreadlocinfo locinfo;
00082     MSVCRT_pthreadmbcinfo mbcinfo;
00083 } MSVCRT__locale_tstruct, *MSVCRT__locale_t;
00084 
00085 /* TLS data */
00086 extern DWORD tls_index;
00087 
00088 struct __thread_data {
00089     DWORD                    tid;
00090     HANDLE                   handle;
00091     int                      thread_errno;
00092     unsigned long            thread_doserrno;
00093     int                      unk1;
00094     unsigned int             random_seed;        /* seed for rand() */
00095     char                     *strtok_next;        /* next ptr for strtok() */
00096     wchar_t                  *wcstok_next;        /* next ptr for wcstok() */
00097     unsigned char            *mbstok_next;        /* next ptr for mbstok() */
00098     char                     *strerror_buffer;    /* buffer for strerror */
00099     wchar_t                  *wcserror_buffer;    /* buffer for wcserror */
00100     char                     *tmpnam_buffer;      /* buffer for tmpname() */
00101     wchar_t                  *wtmpnam_buffer;     /* buffer for wtmpname() */
00102     void                     *unk2[2];
00103     char                     *asctime_buffer;     /* buffer for asctime */
00104     wchar_t                  *wasctime_buffer;    /* buffer for wasctime */
00105     struct tm                *time_buffer;        /* buffer for localtime/gmtime */
00106     char                     *efcvt_buffer;       /* buffer for ecvt/fcvt */
00107     int                      unk3[2];
00108     void                     *unk4[4];
00109     int                      fpecode;
00110     MSVCRT_pthreadmbcinfo    mbcinfo;
00111     MSVCRT_pthreadlocinfo    locinfo;
00112     BOOL                     have_locale;
00113     int                      unk5[1];
00114     terminate_function       terminate_handler;
00115     unexpected_function      unexpected_handler;
00116     _se_translator_function  se_translator;
00117     void                     *unk6[3];
00118     int                      unk7;
00119     EXCEPTION_RECORD         *exc_record;
00120     void                     *unk8[100];
00121 };
00122 
00123 typedef struct __thread_data thread_data_t;
00124 
00125 extern inline BOOL msvcrt_init_tls(void);
00126 extern inline BOOL msvcrt_free_tls(void);
00127 extern thread_data_t *msvcrt_get_thread_data(void);
00128 extern inline void msvcrt_free_tls_mem(void);
00129 
00130 #define MSVCRT_ENABLE_PER_THREAD_LOCALE 1
00131 #define MSVCRT_DISABLE_PER_THREAD_LOCALE 2
00132 
00133 extern MSVCRT__locale_t MSVCRT_locale;
00134 MSVCRT_pthreadlocinfo get_locinfo(void);
00135 void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
00136 void free_locinfo(MSVCRT_pthreadlocinfo);
00137 void free_mbcinfo(MSVCRT_pthreadmbcinfo);
00138 
00139 #endif /* __MSVCRT_INTERNAL_TLS_H */
00140 
00141 /* EOF */

Generated on Mon May 28 2012 04:36:16 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.