diff options
Diffstat (limited to 'openmp/runtime/src/z_Linux_util.c')
| -rw-r--r-- | openmp/runtime/src/z_Linux_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openmp/runtime/src/z_Linux_util.c b/openmp/runtime/src/z_Linux_util.c index 6c51301d1bf..b3c3e80083b 100644 --- a/openmp/runtime/src/z_Linux_util.c +++ b/openmp/runtime/src/z_Linux_util.c @@ -59,6 +59,8 @@ #include <ctype.h> #include <fcntl.h> +#include "tsan_annotations.h" + /* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */ @@ -1609,6 +1611,7 @@ __kmp_suspend_initialize( void ) static void __kmp_suspend_initialize_thread( kmp_info_t *th ) { + ANNOTATE_HAPPENS_AFTER(&th->th.th_suspend_init_count); if ( th->th.th_suspend_init_count <= __kmp_fork_count ) { /* this means we haven't initialized the suspension pthread objects for this thread in this instance of the process */ @@ -1618,6 +1621,7 @@ __kmp_suspend_initialize_thread( kmp_info_t *th ) status = pthread_mutex_init( &th->th.th_suspend_mx.m_mutex, & __kmp_suspend_mutex_attr ); KMP_CHECK_SYSFAIL( "pthread_mutex_init", status ); *(volatile int*)&th->th.th_suspend_init_count = __kmp_fork_count + 1; + ANNOTATE_HAPPENS_BEFORE(&th->th.th_suspend_init_count); }; } |

