aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/context.h
diff options
context:
space:
mode:
authorpg <pg@yandex-team.com>2022-09-29 12:29:04 +0300
committerpg <pg@yandex-team.com>2022-09-29 12:29:04 +0300
commit415be0d1a1a30e2256bbf072fcec6c81cce8d706 (patch)
treed45a87b3a64a929ab5da62184551b3ed37af69a2 /util/system/context.h
parentcf643416793b68ae8ee6ca29d7a930fe2a9d6d0b (diff)
downloadydb-415be0d1a1a30e2256bbf072fcec6c81cce8d706.tar.gz
Clang14: Fix library/cpp/coroutine/engine under tsan
Diffstat (limited to 'util/system/context.h')
-rw-r--r--util/system/context.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/system/context.h b/util/system/context.h
index d2a349bfc5..91c0831338 100644
--- a/util/system/context.h
+++ b/util/system/context.h
@@ -20,7 +20,9 @@
/*
* switch method
*/
-#if defined(_bionic_) || defined(__IOS__)
+#if defined(thread_sanitizer_enabled)
+ #define USE_UCONTEXT_CONT
+#elif defined(_bionic_) || defined(__IOS__)
#define USE_GENERIC_CONT
#elif defined(_cygwin_)
#define USE_UCONTEXT_CONT