aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/rwlock.h
diff options
context:
space:
mode:
authortejblum <tejblum@yandex-team.ru>2022-02-10 16:48:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:02 +0300
commit6ab7e5f5ada0643a48d393717f443bd548706ffc (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /util/system/rwlock.h
parent2bf39531b4f50b889e946ac4866018678a4fb281 (diff)
downloadydb-6ab7e5f5ada0643a48d393717f443bd548706ffc.tar.gz
Restoring authorship annotation for <tejblum@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/rwlock.h')
-rw-r--r--util/system/rwlock.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/rwlock.h b/util/system/rwlock.h
index c4b28b06a5..0bb9b3fe1c 100644
--- a/util/system/rwlock.h
+++ b/util/system/rwlock.h
@@ -1,25 +1,25 @@
#pragma once
-
+
#include "guard.h"
#include "defaults.h"
-
+
#include <util/generic/ptr.h>
class TRWMutex {
public:
TRWMutex();
~TRWMutex();
-
+
void AcquireRead() noexcept;
bool TryAcquireRead() noexcept;
void ReleaseRead() noexcept;
-
+
void AcquireWrite() noexcept;
bool TryAcquireWrite() noexcept;
void ReleaseWrite() noexcept;
void Release() noexcept;
-
+
private:
class TImpl;
THolder<TImpl> Impl_;
@@ -34,8 +34,8 @@ struct TReadGuardOps {
static inline void Release(T* t) noexcept {
t->ReleaseRead();
}
-};
-
+};
+
template <class T>
struct TTryReadGuardOps: public TReadGuardOps<T> {
static inline bool TryAcquire(T* t) noexcept {
@@ -52,8 +52,8 @@ struct TWriteGuardOps {
static inline void Release(T* t) noexcept {
t->ReleaseWrite();
}
-};
-
+};
+
template <class T>
struct TTryWriteGuardOps: public TWriteGuardOps<T> {
static inline bool TryAcquire(T* t) noexcept {