diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /util/system/spinlock.h | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'util/system/spinlock.h')
-rw-r--r-- | util/system/spinlock.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/system/spinlock.h b/util/system/spinlock.h index af2630890a..85d8a281b8 100644 --- a/util/system/spinlock.h +++ b/util/system/spinlock.h @@ -14,7 +14,7 @@ public: return AtomicGet(Val_); } - inline bool TryAcquire() noexcept { + inline bool TryAcquire() noexcept { return AtomicTryLock(&Val_); } @@ -56,11 +56,11 @@ class TSpinLock: public TSpinLockBase { public: using TSpinLockBase::TSpinLockBase; - inline void Release() noexcept { + inline void Release() noexcept { ReleaseSpinLock(&Val_); } - inline void Acquire() noexcept { + inline void Acquire() noexcept { AcquireSpinLock(&Val_); } @@ -91,11 +91,11 @@ class TAdaptiveLock: public TSpinLockBase { public: using TSpinLockBase::TSpinLockBase; - inline void Release() noexcept { + inline void Release() noexcept { ReleaseAdaptiveLock(&Val_); } - inline void Acquire() noexcept { + inline void Acquire() noexcept { AcquireAdaptiveLock(&Val_); } @@ -112,15 +112,15 @@ public: template <> struct TCommonLockOps<TAtomic> { - static inline void Acquire(TAtomic* v) noexcept { + static inline void Acquire(TAtomic* v) noexcept { AcquireAdaptiveLock(v); } - static inline bool TryAcquire(TAtomic* v) noexcept { + static inline bool TryAcquire(TAtomic* v) noexcept { return AtomicTryLock(v); } - static inline void Release(TAtomic* v) noexcept { + static inline void Release(TAtomic* v) noexcept { ReleaseAdaptiveLock(v); } }; |