Changeset View
Changeset View
Standalone View
Standalone View
runtime/src/kmp_ftn_entry.h
Show First 20 Lines • Show All 391 Lines • ▼ Show 20 Lines | |||||
#endif /* OMP_50_ENABLED */ | #endif /* OMP_50_ENABLED */ | ||||
int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_THREAD_NUM)(void) { | int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_THREAD_NUM)(void) { | ||||
#ifdef KMP_STUB | #ifdef KMP_STUB | ||||
return 0; | return 0; | ||||
#else | #else | ||||
int gtid; | int gtid; | ||||
#if KMP_OS_DARWIN || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD | #if KMP_OS_DARWIN || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || \ | ||||
KMP_OS_HURD | |||||
gtid = __kmp_entry_gtid(); | gtid = __kmp_entry_gtid(); | ||||
#elif KMP_OS_WINDOWS | #elif KMP_OS_WINDOWS | ||||
if (!__kmp_init_parallel || | if (!__kmp_init_parallel || | ||||
(gtid = (int)((kmp_intptr_t)TlsGetValue(__kmp_gtid_threadprivate_key))) == | (gtid = (int)((kmp_intptr_t)TlsGetValue(__kmp_gtid_threadprivate_key))) == | ||||
0) { | 0) { | ||||
// Either library isn't initialized or thread is not registered | // Either library isn't initialized or thread is not registered | ||||
// 0 is the correct TID in this case | // 0 is the correct TID in this case | ||||
return 0; | return 0; | ||||
▲ Show 20 Lines • Show All 935 Lines • Show Last 20 Lines |