diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /util/system/rwlock.cpp | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/rwlock.cpp')
-rw-r--r-- | util/system/rwlock.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/rwlock.cpp b/util/system/rwlock.cpp index 067cbd5140..bb3dcbf188 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 |