aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/spinlock.h
diff options
context:
space:
mode:
authordeshevoy <deshevoy@yandex-team.ru>2022-02-10 16:46:56 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:56 +0300
commite988f30484abe5fdeedcc7a5d3c226c01a21800c (patch)
tree0a217b173aabb57b7e51f8a169989b1a3e0309fe /util/system/spinlock.h
parent33ee501c05d3f24036ae89766a858930ae66c548 (diff)
downloadydb-e988f30484abe5fdeedcc7a5d3c226c01a21800c.tar.gz
Restoring authorship annotation for <deshevoy@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/spinlock.h')
-rw-r--r--util/system/spinlock.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/util/system/spinlock.h b/util/system/spinlock.h
index af2630890a..843bc4e868 100644
--- a/util/system/spinlock.h
+++ b/util/system/spinlock.h
@@ -18,10 +18,10 @@ public:
return AtomicTryLock(&Val_);
}
- inline bool try_lock() noexcept {
- return TryAcquire();
- }
-
+ inline bool try_lock() noexcept {
+ return TryAcquire();
+ }
+
protected:
TAtomic Val_;
};
@@ -63,14 +63,14 @@ public:
inline void Acquire() noexcept {
AcquireSpinLock(&Val_);
}
-
- inline void unlock() noexcept {
- Release();
- }
-
- inline void lock() noexcept {
- Acquire();
- }
+
+ inline void unlock() noexcept {
+ Release();
+ }
+
+ inline void lock() noexcept {
+ Acquire();
+ }
};
static inline void AcquireAdaptiveLock(TAtomic* l) {
@@ -98,14 +98,14 @@ public:
inline void Acquire() noexcept {
AcquireAdaptiveLock(&Val_);
}
-
- inline void unlock() noexcept {
- Release();
- }
-
- inline void lock() noexcept {
- Acquire();
- }
+
+ inline void unlock() noexcept {
+ Release();
+ }
+
+ inline void lock() noexcept {
+ Acquire();
+ }
};
#include "guard.h"