Changes between Initial Version and Version 1 of Ticket #44062, comment 16


Ignore:
Timestamp:
Jun 18, 2014, 3:45:35 PM (10 years ago)
Author:
mojca (Mojca Miklavec)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44062, comment 16

    initial v1  
    11Or, a [https://github.com/root-mirror/root/blob/master/montecarlo/vmc/inc/TMCtls.h way more likely candidate] `montecarlo/vmc/inc/TMCtls.h`:
    22{{{
     3#ifndef ROOT_TMCtls
     4#define ROOT_TMCtls
     5
     6// Thread Local Storage typedefs
     7//
     8// According to Geant4 tls.hh and G4Threading.hh
     9
     10// Always build with thread support but keep a possibility to introduce
     11// a build option
    312#define VMC_MULTITHREADED 1
    4 #if ( defined (VMC_MULTITHREADED) )
    5 #if ( ( defined(__MACH__) && defined(__clang__) && defined(__x86_64__) ) || \
    6 ( defined(__MACH__) && defined(__GNUC__) && __GNUC__>=4 && __GNUC_MINOR__>=7 ) || \
    7 defined(__linux__) || defined(_AIX) ) && ( !defined(__CINT__) )
    8       // Multi-threaded build: for POSIX systems
    9 #include <pthread.h>
    10 #define TMCThreadLocal __thread
     13 
     14#if ( defined (VMC_MULTITHREADED) )
     15  #if ( ( defined(__MACH__) && defined(__clang__) && defined(__x86_64__) ) || \
     16        ( defined(__MACH__) && defined(__GNUC__) && __GNUC__>=4 && __GNUC_MINOR__>=7 ) || \
     17        defined(__linux__) || defined(_AIX) ) && ( !defined(__CINT__) )
     18      //  Multi-threaded build: for POSIX systems
     19      #include <pthread.h>
     20      #define TMCThreadLocal __thread
     21  #else
     22      //#  error "No Thread Local Storage (TLS) technology supported for this platform. Use sequential build !"
     23      #define TMCThreadLocal
     24  #endif
    1125#else
    12       //# error "No Thread Local Storage (TLS) technology supported for this platform. Use sequential build !"
    13 #define TMCThreadLocal
     26  #define TMCThreadLocal
    1427#endif
    15 #else
    16 #define TMCThreadLocal
    17 #endif
     28
     29#endif //ROOT_TMCtls
    1830}}}