diff options
author | David Robillard <d@drobilla.net> | 2011-01-10 21:37:09 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-10 21:37:09 +0000 |
commit | 6be5a6abd94d9d33562f8911578d246af0c7ab4d (patch) | |
tree | 72ef57b3c7f02a3d89d782e16de596aa4b2df7bd /raul/Semaphore.hpp | |
parent | fdd05425e3e74769f5224475fb53fd20863af2f7 (diff) | |
download | raul-6be5a6abd94d9d33562f8911578d246af0c7ab4d.tar.gz raul-6be5a6abd94d9d33562f8911578d246af0c7ab4d.tar.bz2 raul-6be5a6abd94d9d33562f8911578d246af0c7ab4d.zip |
Remove Raul::Command (mostly useless thin wrapper around a semaphore).
Remove Semaphore::has_waiter (not portable).
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2822 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/Semaphore.hpp')
-rw-r--r-- | raul/Semaphore.hpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp index c7b29ef..e17b788 100644 --- a/raul/Semaphore.hpp +++ b/raul/Semaphore.hpp @@ -52,6 +52,10 @@ public: #endif } + /** Destroy and reset the semaphore to an initial value. + * + * This must not be called while there are any waiters. + */ inline void reset(unsigned int initial) { #ifdef __APPLE__ MPDeleteSemaphore(_sem); @@ -62,15 +66,6 @@ public: #endif } - inline bool has_waiter() { - int val; - #ifdef __APPLE__ - #else - sem_getvalue(&_sem, &val); - #endif - return (val <= 0); - } - /** Increment (and signal any waiters). * * Realtime safe. |