aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/actor/thread_extra.h
diff options
context:
space:
mode:
authorAlexander Gololobov <davenger@yandex-team.com>2022-02-10 16:47:37 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:37 +0300
commit39608cdb86363c75ce55b2b9a69841c3b71f22cf (patch)
tree4ec132c1665bd4d68e3628aa18d937c70d32413b /library/cpp/messagebus/actor/thread_extra.h
parent54295b9bd4dc45c54d804084fd846d945148a7f0 (diff)
downloadydb-39608cdb86363c75ce55b2b9a69841c3b71f22cf.tar.gz
Restoring authorship annotation for Alexander Gololobov <davenger@yandex-team.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/actor/thread_extra.h')
-rw-r--r--library/cpp/messagebus/actor/thread_extra.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/messagebus/actor/thread_extra.h b/library/cpp/messagebus/actor/thread_extra.h
index b5aa151618..e4f37a9760 100644
--- a/library/cpp/messagebus/actor/thread_extra.h
+++ b/library/cpp/messagebus/actor/thread_extra.h
@@ -2,28 +2,28 @@
#include <util/thread/singleton.h>
-namespace NTSAN {
+namespace NTSAN {
template <typename T>
inline void RelaxedStore(volatile T* a, T x) {
static_assert(std::is_integral<T>::value || std::is_pointer<T>::value, "expect std::is_integral<T>::value || std::is_pointer<T>::value");
-#ifdef _win_
+#ifdef _win_
*a = x;
-#else
+#else
__atomic_store_n(a, x, __ATOMIC_RELAXED);
-#endif
+#endif
}
-
+
template <typename T>
inline T RelaxedLoad(volatile T* a) {
-#ifdef _win_
+#ifdef _win_
return *a;
-#else
+#else
return __atomic_load_n(a, __ATOMIC_RELAXED);
-#endif
+#endif
}
-
-}
-
+
+}
+
void SetCurrentThreadName(const char* name);
namespace NThreadExtra {