summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-07-23 12:46:48 +0200
committerDavid Robillard <d@drobilla.net>2017-07-23 12:48:42 +0200
commit4db870b2b20b0a608ec0283139056b836c5b1624 (patch)
tree195c386a715c1973a28350c4f4a860994231c7da
parent33282f15338051454dff690e0ba07b1fa3503a97 (diff)
downloadraul-4db870b2b20b0a608ec0283139056b836c5b1624.tar.gz
raul-4db870b2b20b0a608ec0283139056b836c5b1624.tar.bz2
raul-4db870b2b20b0a608ec0283139056b836c5b1624.zip
Fix semaphore with initial count on Darwin
-rw-r--r--NEWS3
-rw-r--r--raul/Semaphore.hpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 0c33fd9..9953c05 100644
--- a/NEWS
+++ b/NEWS
@@ -9,12 +9,13 @@ raul (0.8.9) unstable;
* Add ThreadVar, a thread-specific variable class
* Add managed_ptr for automatic real-time safe garbage collection
* Implement Semaphore for Windows
+ * Fix semaphore with initial count on Darwin
* Improve test suite
* Remove several questionable classes
* Add INSTALL file
* Update license to GPL3+
- -- David Robillard <d@drobilla.net> Mon, 27 Feb 2017 20:36:43 +0100
+ -- David Robillard <d@drobilla.net> Sun, 23 Jul 2017 12:40:39 +0200
raul (0.8.0) stable;
diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp
index 7edb973..31739d2 100644
--- a/raul/Semaphore.hpp
+++ b/raul/Semaphore.hpp
@@ -102,7 +102,7 @@ private:
inline bool
Semaphore::init(unsigned initial)
{
- if (semaphore_create(mach_task_self(), &_sem, SYNC_POLICY_FIFO, 0)) {
+ if (semaphore_create(mach_task_self(), &_sem, SYNC_POLICY_FIFO, initial)) {
return false;
}
return true;