diff options
author | ivanmorozov <ivanmorozov@yandex-team.com> | 2022-11-29 15:52:07 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@yandex-team.com> | 2022-11-29 15:52:07 +0300 |
commit | 8ff1738e8665e5c3a1a328104806bcafbc1bd7ae (patch) | |
tree | 9657e2ea4d923a22e69e954fe11fb77e35bc3271 /library/cpp/neh/asio/io_service_impl.h | |
parent | db99cf88226de50e47bd3acdc0ecfe634ce1d828 (diff) | |
download | ydb-8ff1738e8665e5c3a1a328104806bcafbc1bd7ae.tar.gz |
time providers in separated library for future refactoring
Diffstat (limited to 'library/cpp/neh/asio/io_service_impl.h')
-rw-r--r-- | library/cpp/neh/asio/io_service_impl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/library/cpp/neh/asio/io_service_impl.h b/library/cpp/neh/asio/io_service_impl.h index 46fa9f9ee1..687b5576e8 100644 --- a/library/cpp/neh/asio/io_service_impl.h +++ b/library/cpp/neh/asio/io_service_impl.h @@ -21,6 +21,19 @@ #endif namespace NAsio { +#if defined(_arm_) + template <typename T> + struct TLockFreeSequence { + Y_NO_INLINE T& Get(size_t n) { + with_lock (M) { + return H[n]; + } + } + + TMutex M; + THashMap<size_t, T> H; + }; +#else //TODO: copypaste from neh, - need fix template <class T> class TLockFreeSequence { @@ -59,6 +72,7 @@ namespace NAsio { private: T* volatile T_[sizeof(size_t) * 8]; }; +#endif struct TOperationCompare { template <class T> |