diff options
author | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-09-02 10:23:01 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.commkdir> | 2009-09-02 10:23:01 +0200 |
commit | 5e08a89d1c0edf44e15f262dd0f27a1c03bcd699 (patch) | |
tree | eba28221c1e5e69418078df406609e8d3dffe64c /src/simple_semaphore.hpp | |
parent | 6a5120b1f1c48d19b777f76ac756b00fb624d110 (diff) | |
parent | 1f06d99a0f563fdc32e9c00392f9875ba3009593 (diff) |
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'src/simple_semaphore.hpp')
-rw-r--r-- | src/simple_semaphore.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/simple_semaphore.hpp b/src/simple_semaphore.hpp index b48a7f5..209ccb4 100644 --- a/src/simple_semaphore.hpp +++ b/src/simple_semaphore.hpp @@ -53,32 +53,32 @@ namespace zmq inline simple_semaphore_t () { int rc = pthread_mutex_init (&mutex, NULL); - errno_assert (rc == 0); + posix_assert (rc); rc = pthread_mutex_lock (&mutex); - errno_assert (rc == 0); + posix_assert (rc); } // Destroy the semaphore. inline ~simple_semaphore_t () { int rc = pthread_mutex_unlock (&mutex); - errno_assert (rc == 0); + posix_assert (rc); rc = pthread_mutex_destroy (&mutex); - errno_assert (rc == 0); + posix_assert (rc); } // Wait for the semaphore. inline void wait () { int rc = pthread_mutex_lock (&mutex); - errno_assert (rc == 0); + posix_assert (rc); } // Post the semaphore. inline void post () { int rc = pthread_mutex_unlock (&mutex); - errno_assert (rc == 0); + posix_assert (rc); } private: |