aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/rwlock.h
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/rwlock.h
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/rwlock.h')
-rw-r--r--util/system/rwlock.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/util/system/rwlock.h b/util/system/rwlock.h
index b476837c92..0bb9b3fe1c 100644
--- a/util/system/rwlock.h
+++ b/util/system/rwlock.h
@@ -8,17 +8,17 @@
class TRWMutex {
public:
TRWMutex();
- ~TRWMutex();
+ ~TRWMutex();
- void AcquireRead() noexcept;
- bool TryAcquireRead() noexcept;
- void ReleaseRead() noexcept;
+ void AcquireRead() noexcept;
+ bool TryAcquireRead() noexcept;
+ void ReleaseRead() noexcept;
- void AcquireWrite() noexcept;
- bool TryAcquireWrite() noexcept;
- void ReleaseWrite() noexcept;
+ void AcquireWrite() noexcept;
+ bool TryAcquireWrite() noexcept;
+ void ReleaseWrite() noexcept;
- void Release() noexcept;
+ void Release() noexcept;
private:
class TImpl;
@@ -27,36 +27,36 @@ private:
template <class T>
struct TReadGuardOps {
- static inline void Acquire(T* t) noexcept {
+ static inline void Acquire(T* t) noexcept {
t->AcquireRead();
}
- static inline void Release(T* t) noexcept {
+ static inline void Release(T* t) noexcept {
t->ReleaseRead();
}
};
template <class T>
struct TTryReadGuardOps: public TReadGuardOps<T> {
- static inline bool TryAcquire(T* t) noexcept {
+ static inline bool TryAcquire(T* t) noexcept {
return t->TryAcquireRead();
}
};
template <class T>
struct TWriteGuardOps {
- static inline void Acquire(T* t) noexcept {
+ static inline void Acquire(T* t) noexcept {
t->AcquireWrite();
}
- static inline void Release(T* t) noexcept {
+ static inline void Release(T* t) noexcept {
t->ReleaseWrite();
}
};
template <class T>
struct TTryWriteGuardOps: public TWriteGuardOps<T> {
- static inline bool TryAcquire(T* t) noexcept {
+ static inline bool TryAcquire(T* t) noexcept {
return t->TryAcquireWrite();
}
};