diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-12-17 16:19:05 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-12-17 16:19:05 +0000 |
commit | ad579928878bffb2ba8899e7f6e311ef8dcdccdb (patch) | |
tree | cde266cfe45f492cba21545930b453f14822c957 /openmp/runtime/src | |
parent | 4b1aad37d822016f18586c6adb98033a794cdbdf (diff) | |
download | bcm5719-llvm-ad579928878bffb2ba8899e7f6e311ef8dcdccdb.tar.gz bcm5719-llvm-ad579928878bffb2ba8899e7f6e311ef8dcdccdb.zip |
[STATS] Fix stats lock problem to be compatible with new hinted lock code
llvm-svn: 255901
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/kmp_global.c | 2 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_runtime.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_global.c b/openmp/runtime/src/kmp_global.c index 55ef4e699e4..bdac75b0058 100644 --- a/openmp/runtime/src/kmp_global.c +++ b/openmp/runtime/src/kmp_global.c @@ -22,7 +22,7 @@ kmp_cpuinfo_t __kmp_cpuinfo = { 0 }; // Not initialized #if KMP_STATS_ENABLED #include "kmp_stats.h" // lock for modifying the global __kmp_stats_list -kmp_tas_lock_t __kmp_stats_lock = KMP_TAS_LOCK_INITIALIZER(__kmp_stats_lock); +kmp_tas_lock_t __kmp_stats_lock; // global list of per thread stats, the head is a sentinel node which accumulates all stats produced before __kmp_create_worker is called. kmp_stats_list __kmp_stats_list; diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c index 0cf34e9b2a7..39d59b5e045 100644 --- a/openmp/runtime/src/kmp_runtime.c +++ b/openmp/runtime/src/kmp_runtime.c @@ -6333,6 +6333,9 @@ __kmp_do_serial_initialize( void ) __kmp_init_speculative_stats(); #endif #endif +#if KMP_STATS_ENABLED + __kmp_init_tas_lock( & __kmp_stats_lock ); +#endif __kmp_init_lock( & __kmp_global_lock ); __kmp_init_queuing_lock( & __kmp_dispatch_lock ); __kmp_init_lock( & __kmp_debug_lock ); |