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/sem.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/sem.cpp')
-rw-r--r-- | util/system/sem.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/system/sem.cpp b/util/system/sem.cpp index 8263992de4..4a93b903b5 100644 --- a/util/system/sem.cpp +++ b/util/system/sem.cpp @@ -129,7 +129,7 @@ namespace { #else int ret = sem_post(Handle); #endif - Y_VERIFY(ret == 0, "can not release semaphore"); + Y_VERIFY(ret == 0, "can not release semaphore"); #endif } @@ -137,7 +137,7 @@ namespace { //hence to maintain consistancy, for win32 case we use INFINITE or 0 timeout. inline void Acquire() noexcept { #ifdef _win_ - Y_VERIFY(::WaitForSingleObject(Handle, INFINITE) == WAIT_OBJECT_0, "can not acquire semaphore"); + Y_VERIFY(::WaitForSingleObject(Handle, INFINITE) == WAIT_OBJECT_0, "can not acquire semaphore"); #else #ifdef USE_SYSV_SEMAPHORES struct sembuf ops[] = {{0, -1, SEM_UNDO}}; @@ -145,7 +145,7 @@ namespace { #else int ret = sem_wait(Handle); #endif - Y_VERIFY(ret == 0, "can not acquire semaphore"); + Y_VERIFY(ret == 0, "can not acquire semaphore"); #endif } @@ -183,20 +183,20 @@ namespace { } inline ~TPosixSemaphore() { - Y_VERIFY(sem_destroy(&S_) == 0, "semaphore destroy failed"); + Y_VERIFY(sem_destroy(&S_) == 0, "semaphore destroy failed"); } inline void Acquire() noexcept { - Y_VERIFY(sem_wait(&S_) == 0, "semaphore acquire failed"); + Y_VERIFY(sem_wait(&S_) == 0, "semaphore acquire failed"); } inline void Release() noexcept { - Y_VERIFY(sem_post(&S_) == 0, "semaphore release failed"); + Y_VERIFY(sem_post(&S_) == 0, "semaphore release failed"); } inline bool TryAcquire() noexcept { if (sem_trywait(&S_)) { - Y_VERIFY(errno == EAGAIN, "semaphore try wait failed"); + Y_VERIFY(errno == EAGAIN, "semaphore try wait failed"); return false; } |