diff options
author | arcadia-devtools <[email protected]> | 2022-03-04 17:07:42 +0300 |
---|---|---|
committer | arcadia-devtools <[email protected]> | 2022-03-04 17:07:42 +0300 |
commit | b81e978bbba64cd6c17f8bc64f06fd940ba70e2b (patch) | |
tree | 963c0bd898cbfccac68543c3dffcbe07eeeeaf79 /contrib/libs/cxxsupp/openmp/z_Linux_util.c | |
parent | 0e68a9803d96e74d7905b6eb556bf142a6ba7c59 (diff) |
intermediate changes
ref:706109e1fa74d21f22e35e791a5b533dc95e59a4
Diffstat (limited to 'contrib/libs/cxxsupp/openmp/z_Linux_util.c')
-rw-r--r-- | contrib/libs/cxxsupp/openmp/z_Linux_util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/libs/cxxsupp/openmp/z_Linux_util.c b/contrib/libs/cxxsupp/openmp/z_Linux_util.c index 237677b24cf..0ebd9c4a9b9 100644 --- a/contrib/libs/cxxsupp/openmp/z_Linux_util.c +++ b/contrib/libs/cxxsupp/openmp/z_Linux_util.c @@ -1123,6 +1123,13 @@ __kmp_create_monitor( kmp_info_t *th ) int status; int auto_adj_size = FALSE; + if( __kmp_dflt_blocktime == KMP_MAX_BLOCKTIME ) { + // We don't need monitor thread in case of MAX_BLOCKTIME + KA_TRACE( 10, ("__kmp_create_monitor: skipping monitor thread because of MAX blocktime\n" ) ); + th->th.th_info.ds.ds_tid = 0; // this makes reap_monitor no-op + th->th.th_info.ds.ds_gtid = 0; + return; + } KA_TRACE( 10, ("__kmp_create_monitor: try to create monitor\n" ) ); KMP_MB(); /* Flush all pending memory write invalidates. */ @@ -1291,6 +1298,7 @@ __kmp_reap_monitor( kmp_info_t *th ) // If both tid and gtid are KMP_GTID_DNE, the monitor has been shut down. KMP_DEBUG_ASSERT( th->th.th_info.ds.ds_tid == th->th.th_info.ds.ds_gtid ); if ( th->th.th_info.ds.ds_gtid != KMP_GTID_MONITOR ) { + KA_TRACE( 10, ("__kmp_reap_monitor: monitor did not start, returning\n") ); return; }; // if |