summaryrefslogtreecommitdiffstats
path: root/util/system/rwlock.h
diff options
context:
space:
mode:
authortejblum <[email protected]>2022-02-10 16:48:02 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:48:02 +0300
commit2bf39531b4f50b889e946ac4866018678a4fb281 (patch)
tree65ee082892af9db55f726e13950abf0b1cc65992 /util/system/rwlock.h
parenta61e8c559b6b690a019253067224d595e3d642f1 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 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 0bb9b3fe1c8..c4b28b06a50 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 {