aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/rwlock.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/system/rwlock.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/rwlock.cpp')
-rw-r--r--util/system/rwlock.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/rwlock.cpp b/util/system/rwlock.cpp
index bb3dcbf188..067cbd5140 100644
--- a/util/system/rwlock.cpp
+++ b/util/system/rwlock.cpp
@@ -164,7 +164,7 @@ private:
};
TRWMutex::TImpl::TImpl() {
- int result = pthread_rwlock_init(&Lock_, nullptr);
+ int result = pthread_rwlock_init(&Lock_, nullptr);
if (result != 0) {
ythrow yexception() << "rwlock init failed (" << LastSystemErrorText(result) << ")";
}
@@ -172,44 +172,44 @@ TRWMutex::TImpl::TImpl() {
TRWMutex::TImpl::~TImpl() {
const int result = pthread_rwlock_destroy(&Lock_);
- Y_VERIFY(result == 0, "rwlock destroy failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0, "rwlock destroy failed (%s)", LastSystemErrorText(result));
}
void TRWMutex::TImpl::AcquireRead() noexcept {
const int result = pthread_rwlock_rdlock(&Lock_);
- Y_VERIFY(result == 0, "rwlock rdlock failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0, "rwlock rdlock failed (%s)", LastSystemErrorText(result));
}
bool TRWMutex::TImpl::TryAcquireRead() noexcept {
const int result = pthread_rwlock_tryrdlock(&Lock_);
- Y_VERIFY(result == 0 || result == EBUSY, "rwlock tryrdlock failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0 || result == EBUSY, "rwlock tryrdlock failed (%s)", LastSystemErrorText(result));
return result == 0;
}
void TRWMutex::TImpl::ReleaseRead() noexcept {
const int result = pthread_rwlock_unlock(&Lock_);
- Y_VERIFY(result == 0, "rwlock (read) unlock failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0, "rwlock (read) unlock failed (%s)", LastSystemErrorText(result));
}
void TRWMutex::TImpl::AcquireWrite() noexcept {
const int result = pthread_rwlock_wrlock(&Lock_);
- Y_VERIFY(result == 0, "rwlock wrlock failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0, "rwlock wrlock failed (%s)", LastSystemErrorText(result));
}
bool TRWMutex::TImpl::TryAcquireWrite() noexcept {
const int result = pthread_rwlock_trywrlock(&Lock_);
- Y_VERIFY(result == 0 || result == EBUSY, "rwlock trywrlock failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0 || result == EBUSY, "rwlock trywrlock failed (%s)", LastSystemErrorText(result));
return result == 0;
}
void TRWMutex::TImpl::ReleaseWrite() noexcept {
const int result = pthread_rwlock_unlock(&Lock_);
- Y_VERIFY(result == 0, "rwlock (write) unlock failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0, "rwlock (write) unlock failed (%s)", LastSystemErrorText(result));
}
void TRWMutex::TImpl::Release() noexcept {
const int result = pthread_rwlock_unlock(&Lock_);
- Y_VERIFY(result == 0, "rwlock unlock failed (%s)", LastSystemErrorText(result));
+ Y_VERIFY(result == 0, "rwlock unlock failed (%s)", LastSystemErrorText(result));
}
#endif