Changeset 1760 for trunk


Ignore:
Timestamp:
16/11/11 10:33:07 (6 months ago)
Author:
Freddie Akeroyd
Message:

Add MSVC TLS definition. Refs #303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/napi.c

    r1757 r1760  
    5353#define LIBSEP ";" 
    5454#define PATHSEP "\\" 
     55#define THREAD_LOCAL __declspec(thread) 
    5556#else 
    5657#define LIBSEP ":" 
    5758#define PATHSEP "/" 
     59#define THREAD_LOCAL __thread 
    5860#endif 
    5961 
     
    6668 */ 
    6769#include <windows.h> 
     70 
    6871 
    6972static CRITICAL_SECTION nx_critical; 
     
    292295  static void (*NXEHIReportError)(void *pData, char *string) = NXNXNXReportError; 
    293296#ifdef HAVE_TLS 
    294   static __thread void *NXEHpTData = NULL; 
    295   static __thread void (*NXEHIReportTError)(void *pData, char *string) = NULL; 
     297  static THREAD_LOCAL void *NXEHpTData = NULL; 
     298  static THREAD_LOCAL void (*NXEHIReportTError)(void *pData, char *string) = NULL; 
    296299#endif 
    297300 
     
    347350static ErrFunc last_global_errfunc = NXNXNXReportError; 
    348351#ifdef HAVE_TLS 
    349 static __thread ErrFunc last_thread_errfunc = NULL; 
     352static THREAD_LOCAL ErrFunc last_thread_errfunc = NULL; 
    350353#endif 
    351354 
Note: See TracChangeset for help on using the changeset viewer.