00001 00030 #ifndef GALOIS_RUNTIME_LL_TID_H 00031 #define GALOIS_RUNTIME_LL_TID_H 00032 00033 namespace Galois { 00034 namespace Runtime { 00036 namespace LL { 00037 00038 extern __thread unsigned TID; 00039 00040 //Get this thread's id. 00041 static inline unsigned getTID() { 00042 return TID; 00043 } 00044 00045 //uninitialized TIDs are 0, and only thread 0 accesses TID before 00046 //initializing it 00047 void initTID(); 00048 00049 #ifdef GALOIS_USE_EXP 00050 void initTID_cilk(); 00051 #endif // GALOIS_USE_EXP 00052 00053 } 00054 } 00055 } 00056 00057 #endif //_TID_H