aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-04 17:07:42 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-04 17:07:42 +0300
commitb81e978bbba64cd6c17f8bc64f06fd940ba70e2b (patch)
tree963c0bd898cbfccac68543c3dffcbe07eeeeaf79
parent0e68a9803d96e74d7905b6eb556bf142a6ba7c59 (diff)
downloadydb-b81e978bbba64cd6c17f8bc64f06fd940ba70e2b.tar.gz
intermediate changes
ref:706109e1fa74d21f22e35e791a5b533dc95e59a4
-rw-r--r--build/mapping.conf.json6
-rw-r--r--build/ya.conf.json2
-rw-r--r--contrib/libs/cxxsupp/openmp/exports_so.txt1
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp.h14
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_affinity.cpp38
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_config.h10
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_csupport.c9
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_dispatch.cpp54
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_gsupport.c3
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_lock.cpp5
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_os.h35
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_platform.h3
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_runtime.c4
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_tasking.c9
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_version.c2
-rw-r--r--contrib/libs/cxxsupp/openmp/kmp_wait_release.h14
-rw-r--r--contrib/libs/cxxsupp/openmp/ya.make4
-rw-r--r--contrib/libs/cxxsupp/openmp/z_Linux_util.c8
-rwxr-xr-xya4
19 files changed, 109 insertions, 116 deletions
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 9c7f2e3f98..1d12820006 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -2967,6 +2967,12 @@
"2835396082": "https://storage.mds.yandex.net/get-devtools-opensource/471749/2835396082",
"2835396951": "https://storage.mds.yandex.net/get-devtools-opensource/373962/2835396951",
"2835397488": "https://storage.mds.yandex.net/get-devtools-opensource/479623/2835397488",
+ "2843788069": "https://storage.mds.yandex.net/get-devtools-opensource/479623/2843788069",
+ "2843788983": "https://storage.mds.yandex.net/get-devtools-opensource/233854/2843788983",
+ "2843789281": "https://storage.mds.yandex.net/get-devtools-opensource/479623/2843789281",
+ "2843823282": "https://storage.mds.yandex.net/get-devtools-opensource/471749/2843823282",
+ "2843823836": "https://storage.mds.yandex.net/get-devtools-opensource/471749/2843823836",
+ "2843824017": "https://storage.mds.yandex.net/get-devtools-opensource/233854/2843824017",
"309054781": "https://storage.mds.yandex.net/get-devtools-opensource/250854/309054781",
"360916612": "https://storage.mds.yandex.net/get-devtools-opensource/233854/360916612",
"412716868": "https://storage.mds.yandex.net/get-devtools-opensource/233854/412716868",
diff --git a/build/ya.conf.json b/build/ya.conf.json
index 56f9b766cf..83bced23f5 100644
--- a/build/ya.conf.json
+++ b/build/ya.conf.json
@@ -8083,7 +8083,7 @@
},
"sedem": {
"formula": {
- "sandbox_id": 1227052000,
+ "sandbox_id": 1232901498,
"match": "SEDEM archive"
},
"executable": {
diff --git a/contrib/libs/cxxsupp/openmp/exports_so.txt b/contrib/libs/cxxsupp/openmp/exports_so.txt
index 27c20abcd7..98b6270742 100644
--- a/contrib/libs/cxxsupp/openmp/exports_so.txt
+++ b/contrib/libs/cxxsupp/openmp/exports_so.txt
@@ -96,7 +96,6 @@ VERSION {
__kmp_wait_64;
__kmp_wait_oncore;
__kmp_wait_yield_4;
- __kmp_wait_yield_8;
# ittnotify symbols to be used by debugger
__kmp_itt_fini_ittlib;
diff --git a/contrib/libs/cxxsupp/openmp/kmp.h b/contrib/libs/cxxsupp/openmp/kmp.h
index b122a6184b..6bd26e52c8 100644
--- a/contrib/libs/cxxsupp/openmp/kmp.h
+++ b/contrib/libs/cxxsupp/openmp/kmp.h
@@ -1671,9 +1671,9 @@ typedef struct kmp_disp {
#define KMP_BARRIER_UNUSED_BIT 1 /* bit that must never be set for valid state */
#define KMP_BARRIER_BUMP_BIT 2 /* lsb used for bump of go/arrived state */
-#define KMP_BARRIER_SLEEP_STATE ((kmp_uint) (1 << KMP_BARRIER_SLEEP_BIT))
-#define KMP_BARRIER_UNUSED_STATE ((kmp_uint) (1 << KMP_BARRIER_UNUSED_BIT))
-#define KMP_BARRIER_STATE_BUMP ((kmp_uint) (1 << KMP_BARRIER_BUMP_BIT))
+#define KMP_BARRIER_SLEEP_STATE (1 << KMP_BARRIER_SLEEP_BIT)
+#define KMP_BARRIER_UNUSED_STATE (1 << KMP_BARRIER_UNUSED_BIT)
+#define KMP_BARRIER_STATE_BUMP (1 << KMP_BARRIER_BUMP_BIT)
#if (KMP_BARRIER_SLEEP_BIT >= KMP_BARRIER_BUMP_BIT)
# error "Barrier sleep bit must be smaller than barrier bump bit"
@@ -2998,15 +2998,7 @@ extern kmp_uint32 __kmp_neq_4( kmp_uint32 value, kmp_uint32 checker );
extern kmp_uint32 __kmp_lt_4( kmp_uint32 value, kmp_uint32 checker );
extern kmp_uint32 __kmp_ge_4( kmp_uint32 value, kmp_uint32 checker );
extern kmp_uint32 __kmp_le_4( kmp_uint32 value, kmp_uint32 checker );
-
-extern kmp_uint32 __kmp_eq_8( kmp_uint64 value, kmp_uint64 checker );
-extern kmp_uint32 __kmp_neq_8( kmp_uint64 value, kmp_uint64 checker );
-extern kmp_uint32 __kmp_lt_8( kmp_uint64 value, kmp_uint64 checker );
-extern kmp_uint32 __kmp_ge_8( kmp_uint64 value, kmp_uint64 checker );
-extern kmp_uint32 __kmp_le_8( kmp_uint64 value, kmp_uint64 checker );
-
extern kmp_uint32 __kmp_wait_yield_4( kmp_uint32 volatile * spinner, kmp_uint32 checker, kmp_uint32 (*pred) (kmp_uint32, kmp_uint32), void * obj );
-extern kmp_uint64 __kmp_wait_yield_8( kmp_uint64 volatile * spinner, kmp_uint64 checker, kmp_uint32 (*pred) (kmp_uint64, kmp_uint64), void * obj );
class kmp_flag_32;
class kmp_flag_64;
diff --git a/contrib/libs/cxxsupp/openmp/kmp_affinity.cpp b/contrib/libs/cxxsupp/openmp/kmp_affinity.cpp
index 4e6699ff21..0dc6f73471 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_affinity.cpp
+++ b/contrib/libs/cxxsupp/openmp/kmp_affinity.cpp
@@ -4732,4 +4732,42 @@ void __kmp_balanced_affinity( int tid, int nthreads )
}
}
+#if KMP_OS_LINUX
+// We don't need this entry for Windows because
+// there is GetProcessAffinityMask() api
+//
+// The intended usage is indicated by these steps:
+// 1) The user gets the current affinity mask
+// 2) Then sets the affinity by calling this function
+// 3) Error check the return value
+// 4) Use non-OpenMP parallelization
+// 5) Reset the affinity to what was stored in step 1)
+#ifdef __cplusplus
+extern "C"
+#endif
+int
+kmp_set_thread_affinity_mask_initial()
+// the function returns 0 on success,
+// -1 if we cannot bind thread
+// >0 (errno) if an error happened during binding
+{
+ int gtid = __kmp_get_gtid();
+ if (gtid < 0) {
+ // Do not touch non-omp threads
+ KA_TRACE(30, ( "kmp_set_thread_affinity_mask_initial: "
+ "non-omp thread, returning\n"));
+ return -1;
+ }
+ if (!KMP_AFFINITY_CAPABLE() || !__kmp_init_middle) {
+ KA_TRACE(30, ( "kmp_set_thread_affinity_mask_initial: "
+ "affinity not initialized, returning\n"));
+ return -1;
+ }
+ KA_TRACE(30, ( "kmp_set_thread_affinity_mask_initial: "
+ "set full mask for thread %d\n", gtid));
+ KMP_DEBUG_ASSERT(fullMask != NULL);
+ return __kmp_set_system_affinity(fullMask, FALSE);
+}
+#endif
+
#endif // KMP_AFFINITY_SUPPORTED
diff --git a/contrib/libs/cxxsupp/openmp/kmp_config.h b/contrib/libs/cxxsupp/openmp/kmp_config.h
index 35d10e2bfd..ccde89de95 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_config.h
+++ b/contrib/libs/cxxsupp/openmp/kmp_config.h
@@ -33,6 +33,12 @@
#define KMP_HAVE_PSAPI LIBOMP_HAVE_PSAPI
#define LIBOMP_STATS 0
#define KMP_STATS_ENABLED LIBOMP_STATS
+#define LIBOMP_HAVE_X86INTRIN_H 0
+#define KMP_HAVE_X86INTRIN_H LIBOMP_HAVE_X86INTRIN_H
+#define LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER 0
+#define KMP_HAVE___BUILTIN_READCYCLECOUNTER LIBOMP_HAVE___BUILTIN_READCYCLECOUNTER
+#define LIBOMP_HAVE___RDTSC 0
+#define KMP_HAVE___RDTSC LIBOMP_HAVE___RDTSC
#define LIBOMP_USE_DEBUGGER 0
#define USE_DEBUGGER LIBOMP_USE_DEBUGGER
#define LIBOMP_OMPT_DEBUG 0
@@ -70,6 +76,10 @@
# define CACHE_LINE 64
#endif
+#if ! KMP_32_BIT_ARCH
+# define BUILD_I8 1
+#endif
+
#define KMP_DYNAMIC_LIB 1
#define KMP_NESTED_HOT_TEAMS 1
#define KMP_ADJUST_BLOCKTIME 1
diff --git a/contrib/libs/cxxsupp/openmp/kmp_csupport.c b/contrib/libs/cxxsupp/openmp/kmp_csupport.c
index c3a21287d4..ab5f99bf5b 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_csupport.c
+++ b/contrib/libs/cxxsupp/openmp/kmp_csupport.c
@@ -2202,6 +2202,12 @@ __kmpc_set_nest_lock( ident_t * loc, kmp_int32 gtid, void ** user_lock ) {
__kmp_itt_lock_acquired((kmp_user_lock_p)user_lock);
#endif
+#if OMPT_SUPPORT && OMPT_TRACE
+ if (ompt_enabled) {
+ // missing support here: need to know whether acquired first or not
+ }
+#endif
+
#else // KMP_USE_DYNAMIC_LOCK
int acquire_status;
kmp_user_lock_p lck;
@@ -2230,7 +2236,6 @@ __kmpc_set_nest_lock( ident_t * loc, kmp_int32 gtid, void ** user_lock ) {
#if USE_ITT_BUILD
__kmp_itt_lock_acquired( lck );
#endif /* USE_ITT_BUILD */
-#endif // KMP_USE_DYNAMIC_LOCK
#if OMPT_SUPPORT && OMPT_TRACE
if (ompt_enabled) {
@@ -2243,6 +2248,8 @@ __kmpc_set_nest_lock( ident_t * loc, kmp_int32 gtid, void ** user_lock ) {
}
}
#endif
+
+#endif // KMP_USE_DYNAMIC_LOCK
}
void
diff --git a/contrib/libs/cxxsupp/openmp/kmp_dispatch.cpp b/contrib/libs/cxxsupp/openmp/kmp_dispatch.cpp
index c19448efc2..34ee118ff5 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_dispatch.cpp
+++ b/contrib/libs/cxxsupp/openmp/kmp_dispatch.cpp
@@ -2515,25 +2515,6 @@ kmp_uint32 __kmp_ge_4( kmp_uint32 value, kmp_uint32 checker) {
kmp_uint32 __kmp_le_4( kmp_uint32 value, kmp_uint32 checker) {
return value <= checker;
}
-kmp_uint32 __kmp_eq_8( kmp_uint64 value, kmp_uint64 checker) {
- return value == checker;
-}
-
-kmp_uint32 __kmp_neq_8( kmp_uint64 value, kmp_uint64 checker) {
- return value != checker;
-}
-
-kmp_uint32 __kmp_lt_8( kmp_uint64 value, kmp_uint64 checker) {
- return value < checker;
-}
-
-kmp_uint32 __kmp_ge_8( kmp_uint64 value, kmp_uint64 checker) {
- return value >= checker;
-}
-
-kmp_uint32 __kmp_le_8( kmp_uint64 value, kmp_uint64 checker) {
- return value <= checker;
-}
kmp_uint32
__kmp_wait_yield_4(volatile kmp_uint32 * spinner,
@@ -2568,41 +2549,6 @@ __kmp_wait_yield_4(volatile kmp_uint32 * spinner,
return r;
}
-kmp_uint64
-__kmp_wait_yield_8( volatile kmp_uint64 * spinner,
- kmp_uint64 checker,
- kmp_uint32 (* pred)( kmp_uint64, kmp_uint64 )
- , void * obj // Higher-level synchronization object, or NULL.
- )
-{
- // note: we may not belong to a team at this point
- volatile kmp_uint64 * spin = spinner;
- kmp_uint64 check = checker;
- kmp_uint32 spins;
- kmp_uint32 (*f) ( kmp_uint64, kmp_uint64 ) = pred;
- kmp_uint64 r;
-
- KMP_FSYNC_SPIN_INIT( obj, (void*) spin );
- KMP_INIT_YIELD( spins );
- // main wait spin loop
- while(!f(r = *spin, check))
- {
- KMP_FSYNC_SPIN_PREPARE( obj );
- /* GEH - remove this since it was accidentally introduced when kmp_wait was split.
- It causes problems with infinite recursion because of exit lock */
- /* if ( TCR_4(__kmp_global.g.g_done) && __kmp_global.g.g_abort)
- __kmp_abort_thread(); */
-
- // if we are oversubscribed,
- // or have waited a bit (and KMP_LIBARRY=throughput, then yield
- // pause is in the following code
- KMP_YIELD( TCR_4(__kmp_nth) > __kmp_avail_proc );
- KMP_YIELD_SPIN( spins );
- }
- KMP_FSYNC_SPIN_ACQUIRED( obj );
- return r;
-}
-
} // extern "C"
#ifdef KMP_GOMP_COMPAT
diff --git a/contrib/libs/cxxsupp/openmp/kmp_gsupport.c b/contrib/libs/cxxsupp/openmp/kmp_gsupport.c
index 8da9cde524..c1dcd49977 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_gsupport.c
+++ b/contrib/libs/cxxsupp/openmp/kmp_gsupport.c
@@ -13,9 +13,6 @@
//===----------------------------------------------------------------------===//
-#if defined(__x86_64) || defined (__powerpc64__) || defined(__aarch64__)
-# define KMP_I8
-#endif
#include "kmp.h"
#include "kmp_atomic.h"
diff --git a/contrib/libs/cxxsupp/openmp/kmp_lock.cpp b/contrib/libs/cxxsupp/openmp/kmp_lock.cpp
index becf7eddf6..410a56b9e5 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_lock.cpp
+++ b/contrib/libs/cxxsupp/openmp/kmp_lock.cpp
@@ -729,7 +729,7 @@ __kmp_is_ticket_lock_nestable( kmp_ticket_lock_t *lck )
}
static kmp_uint32
-__kmp_bakery_check(kmp_uint value, kmp_uint checker)
+__kmp_bakery_check(kmp_uint32 value, kmp_uint32 checker)
{
kmp_uint32 pause;
@@ -1576,7 +1576,7 @@ __kmp_release_queuing_lock( kmp_queuing_lock_t *lck, kmp_int32 gtid )
KMP_MB();
/* make sure enqueuing thread has time to update next waiting thread field */
- *head_id_p = (kmp_int32) KMP_WAIT_YIELD((volatile kmp_uint*) waiting_id_p, 0, KMP_NEQ, NULL);
+ *head_id_p = KMP_WAIT_YIELD((volatile kmp_uint32*)waiting_id_p, 0, KMP_NEQ, NULL);
#ifdef DEBUG_QUEUING_LOCKS
TRACE_LOCK( gtid+1, "rel deq: (h,t)->(h',t)" );
#endif
@@ -3578,6 +3578,7 @@ __kmp_cleanup_indirect_user_locks()
__kmp_free(ll->lock);
ll->lock = NULL;
}
+ __kmp_indirect_lock_pool[k] = NULL;
}
// Clean up the remaining undestroyed locks.
for (i = 0; i < __kmp_i_lock_table.next; i++) {
diff --git a/contrib/libs/cxxsupp/openmp/kmp_os.h b/contrib/libs/cxxsupp/openmp/kmp_os.h
index 4f89c7379c..017eae4c52 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_os.h
+++ b/contrib/libs/cxxsupp/openmp/kmp_os.h
@@ -173,21 +173,15 @@ typedef double kmp_real64;
# define KMP_UINTPTR_SPEC "lu"
#endif
-#ifdef KMP_I8
+#ifdef BUILD_I8
typedef kmp_int64 kmp_int;
typedef kmp_uint64 kmp_uint;
-# define KMP_INT_SPEC KMP_INT64_SPEC
-# define KMP_UINT_SPEC KMP_UINT64_SPEC
-# define KMP_INT_MAX ((kmp_int64)0x7FFFFFFFFFFFFFFFLL)
-# define KMP_INT_MIN ((kmp_int64)0x8000000000000000LL)
#else
typedef kmp_int32 kmp_int;
typedef kmp_uint32 kmp_uint;
-# define KMP_INT_SPEC KMP_INT32_SPEC
-# define KMP_UINT_SPEC KMP_UINT32_SPEC
-# define KMP_INT_MAX ((kmp_int32)0x7FFFFFFF)
-# define KMP_INT_MIN ((kmp_int32)0x80000000)
-#endif /* KMP_I8 */
+#endif /* BUILD_I8 */
+#define KMP_INT_MAX ((kmp_int32)0x7FFFFFFF)
+#define KMP_INT_MIN ((kmp_int32)0x80000000)
#ifdef __cplusplus
//-------------------------------------------------------------------------
@@ -651,21 +645,12 @@ typedef void (*microtask_t)( int *gtid, int *npr, ... );
# define VOLATILE_CAST(x) (x)
#endif
-#ifdef KMP_I8
-# define KMP_WAIT_YIELD __kmp_wait_yield_8
-# define KMP_EQ __kmp_eq_8
-# define KMP_NEQ __kmp_neq_8
-# define KMP_LT __kmp_lt_8
-# define KMP_GE __kmp_ge_8
-# define KMP_LE __kmp_le_8
-#else
-# define KMP_WAIT_YIELD __kmp_wait_yield_4
-# define KMP_EQ __kmp_eq_4
-# define KMP_NEQ __kmp_neq_4
-# define KMP_LT __kmp_lt_4
-# define KMP_GE __kmp_ge_4
-# define KMP_LE __kmp_le_4
-#endif /* KMP_I8 */
+#define KMP_WAIT_YIELD __kmp_wait_yield_4
+#define KMP_EQ __kmp_eq_4
+#define KMP_NEQ __kmp_neq_4
+#define KMP_LT __kmp_lt_4
+#define KMP_GE __kmp_ge_4
+#define KMP_LE __kmp_le_4
/* Workaround for Intel(R) 64 code gen bug when taking address of static array (Intel(R) 64 Tracker #138) */
#if (KMP_ARCH_X86_64 || KMP_ARCH_PPC64) && KMP_OS_LINUX
diff --git a/contrib/libs/cxxsupp/openmp/kmp_platform.h b/contrib/libs/cxxsupp/openmp/kmp_platform.h
index 0707f2b40a..b6a19dc06c 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_platform.h
+++ b/contrib/libs/cxxsupp/openmp/kmp_platform.h
@@ -160,6 +160,9 @@
# define KMP_MIC2 0
#endif
+/* Specify 32 bit architectures here */
+#define KMP_32_BIT_ARCH (KMP_ARCH_X86 || KMP_ARCH_ARM)
+
// TODO: Fixme - This is clever, but really fugly
#if (1 != KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 + KMP_ARCH_AARCH64)
# error Unknown or unsupported architecture
diff --git a/contrib/libs/cxxsupp/openmp/kmp_runtime.c b/contrib/libs/cxxsupp/openmp/kmp_runtime.c
index 45b3740939..a79a18b85e 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_runtime.c
+++ b/contrib/libs/cxxsupp/openmp/kmp_runtime.c
@@ -6422,7 +6422,7 @@ __kmp_do_serial_initialize( void )
#undef kmp_reduction_barrier_gather_bb
#endif // KMP_FAST_REDUCTION_BARRIER
#if KMP_ARCH_X86_64 && (KMP_OS_LINUX || KMP_OS_WINDOWS)
- if( __kmp_mic_type != non_mic ) {
+ if (__kmp_mic_type == mic2) { // KNC
// AC: plane=3,2, forkjoin=2,1 are optimal for 240 threads on KNC
__kmp_barrier_gather_branch_bits [ bs_plain_barrier ] = 3; // plain gather
__kmp_barrier_release_branch_bits[ bs_forkjoin_barrier ] = 1; // forkjoin release
@@ -6430,7 +6430,7 @@ __kmp_do_serial_initialize( void )
__kmp_barrier_release_pattern[ bs_forkjoin_barrier ] = bp_hierarchical_bar;
}
#if KMP_FAST_REDUCTION_BARRIER
- if( __kmp_mic_type != non_mic ) {
+ if (__kmp_mic_type == mic2) { // KNC
__kmp_barrier_gather_pattern [ bs_reduction_barrier ] = bp_hierarchical_bar;
__kmp_barrier_release_pattern[ bs_reduction_barrier ] = bp_hierarchical_bar;
}
diff --git a/contrib/libs/cxxsupp/openmp/kmp_tasking.c b/contrib/libs/cxxsupp/openmp/kmp_tasking.c
index 47e989ff78..da0910cf6c 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_tasking.c
+++ b/contrib/libs/cxxsupp/openmp/kmp_tasking.c
@@ -691,13 +691,12 @@ __kmp_task_finish( kmp_int32 gtid, kmp_task_t *task, kmp_taskdata_t *resumed_tas
}
// Free this task and then ancestor tasks if they have no children.
+ // Restore th_current_task first as suggested by John:
+ // johnmc: if an asynchronous inquiry peers into the runtime system
+ // it doesn't see the freed task as the current task.
+ thread->th.th_current_task = resumed_task;
__kmp_free_task_and_ancestors(gtid, taskdata, thread);
- // FIXME johnmc: I this statement should be before the last one so if an
- // asynchronous inquiry peers into the runtime system it doesn't see the freed
- // task as the current task
- __kmp_threads[ gtid ] -> th.th_current_task = resumed_task; // restore current_task
-
// TODO: GEH - make sure root team implicit task is initialized properly.
// KMP_DEBUG_ASSERT( resumed_task->td_flags.executing == 0 );
resumed_task->td_flags.executing = 1; // resume previous task
diff --git a/contrib/libs/cxxsupp/openmp/kmp_version.c b/contrib/libs/cxxsupp/openmp/kmp_version.c
index 2ddd76d3ad..328aa09917 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_version.c
+++ b/contrib/libs/cxxsupp/openmp/kmp_version.c
@@ -105,7 +105,7 @@ char const __kmp_version_copyright[] = KMP_VERSION_PREFIX KMP_COPYRIGHT;
char const __kmp_version_lib_ver[] = KMP_VERSION_PREFIX "version: " stringer( KMP_VERSION_MAJOR ) "." stringer( KMP_VERSION_MINOR ) "." stringer( KMP_VERSION_BUILD );
char const __kmp_version_lib_type[] = KMP_VERSION_PREFIX "library type: " KMP_LIB_TYPE;
char const __kmp_version_link_type[] = KMP_VERSION_PREFIX "link type: " KMP_LINK_TYPE;
-char const __kmp_version_build_time[] = KMP_VERSION_PREFIX "build time: " __DATE__ " " __TIME__;
+char const __kmp_version_build_time[] = KMP_VERSION_PREFIX "build time: " "no_timestamp";
#if KMP_MIC2
char const __kmp_version_target_env[] = KMP_VERSION_PREFIX "target environment: MIC2";
#endif
diff --git a/contrib/libs/cxxsupp/openmp/kmp_wait_release.h b/contrib/libs/cxxsupp/openmp/kmp_wait_release.h
index 92db155eb5..0302607a9d 100644
--- a/contrib/libs/cxxsupp/openmp/kmp_wait_release.h
+++ b/contrib/libs/cxxsupp/openmp/kmp_wait_release.h
@@ -86,8 +86,9 @@ class kmp_flag {
/* Spin wait loop that first does pause, then yield, then sleep. A thread that calls __kmp_wait_*
must make certain that another thread calls __kmp_release to wake it back up to prevent deadlocks! */
template <class C>
-static inline void __kmp_wait_template(kmp_info_t *this_thr, C *flag, int final_spin
- USE_ITT_BUILD_ARG(void * itt_sync_obj) )
+static inline void
+__kmp_wait_template(kmp_info_t *this_thr, C *flag, int final_spin
+ USE_ITT_BUILD_ARG(void * itt_sync_obj) )
{
// NOTE: We may not belong to a team at this point.
volatile typename C::flag_t *spin = flag->get();
@@ -282,7 +283,8 @@ static inline void __kmp_wait_template(kmp_info_t *this_thr, C *flag, int final_
if indicated by the sleep bit(s). A thread that calls __kmp_wait_template must call this function to wake
up the potentially sleeping thread and prevent deadlocks! */
template <class C>
-static inline void __kmp_release_template(C *flag)
+static inline void
+__kmp_release_template(C *flag)
{
#ifdef KMP_DEBUG
int gtid = TCR_4(__kmp_init_gtid) ? __kmp_get_gtid() : -1;
@@ -290,11 +292,11 @@ static inline void __kmp_release_template(C *flag)
KF_TRACE(20, ("__kmp_release: T#%d releasing flag(%x)\n", gtid, flag->get()));
KMP_DEBUG_ASSERT(flag->get());
KMP_FSYNC_RELEASING(flag->get());
-
+
flag->internal_release();
-
+
KF_TRACE(100, ("__kmp_release: T#%d set new spin=%d\n", gtid, flag->get(), *(flag->get())));
-
+
if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME) {
// Only need to check sleep stuff if infinite block time not set
if (flag->is_any_sleeping()) { // Are *any* of the threads that wait on this flag sleeping?
diff --git a/contrib/libs/cxxsupp/openmp/ya.make b/contrib/libs/cxxsupp/openmp/ya.make
index e8a498faa8..98cf3abc43 100644
--- a/contrib/libs/cxxsupp/openmp/ya.make
+++ b/contrib/libs/cxxsupp/openmp/ya.make
@@ -9,9 +9,9 @@ OWNER(
g:cpp-contrib
)
-VERSION(5.0)
+VERSION(3.8.0)
-ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/f9cc9d7392adeffc52a4cdf3f93d42f2a18b68f9.tar.gz)
+ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/llvmorg-3.8.0.tar.gz)
LICENSE(
Intel-LLVM-SGA AND
diff --git a/contrib/libs/cxxsupp/openmp/z_Linux_util.c b/contrib/libs/cxxsupp/openmp/z_Linux_util.c
index 237677b24c..0ebd9c4a9b 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
diff --git a/ya b/ya
index fdd928be05..0193f06fbe 100755
--- a/ya
+++ b/ya
@@ -4,8 +4,8 @@ import sys
import platform
import json
-URLS = ["https://storage.mds.yandex.net/get-devtools-opensource/471749/11f899077dc929aab633241c83ff8616"]
-MD5 = "11f899077dc929aab633241c83ff8616"
+URLS = ["https://storage.mds.yandex.net/get-devtools-opensource/233854/f850342577dbea709cf4bc3e50888639"]
+MD5 = "f850342577dbea709cf4bc3e50888639"
RETRIES = 5
HASH_PREFIX = 10