aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-09-28 17:15:29 +0000
committerDavid Robillard <d@drobilla.net>2014-09-28 17:15:29 +0000
commitbc7e103c41031a57829ada9181af056fb9ffc8f7 (patch)
tree67d5a2deca50a34bcc613d558953c88010b55a5b
parent9bd21f8fef6ec692e2765bb83fe9ab2a5ba53c83 (diff)
downloadjalv-bc7e103c41031a57829ada9181af056fb9ffc8f7.tar.gz
jalv-bc7e103c41031a57829ada9181af056fb9ffc8f7.tar.bz2
jalv-bc7e103c41031a57829ada9181af056fb9ffc8f7.zip
Fix semaphore try_wait on windows (Patch from Robin Gareus) (fix #984).
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5469 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--NEWS5
-rw-r--r--src/zix/sem.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 5cb26c5..2a11cd0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
jalv (1.4.7) unstable;
- * Exit on jack shutdown
+ * Exit on jack shutdown (Patch from Robin Gareus)
+ * Fix semaphore try_wait on windows (Patch from Robin Gareus)
- -- David Robillard <d@drobilla.net> Fri, 26 Sep 2014 22:36:07 -0400
+ -- David Robillard <d@drobilla.net> Sun, 28 Sep 2014 13:13:02 -0400
jalv (1.4.6) stable;
diff --git a/src/zix/sem.h b/src/zix/sem.h
index 6a6dc8e..62f49f0 100644
--- a/src/zix/sem.h
+++ b/src/zix/sem.h
@@ -168,7 +168,7 @@ zix_sem_wait(ZixSem* sem)
static inline bool
zix_sem_try_wait(ZixSem* sem)
{
- WaitForSingleObject(sem->sem, 0);
+ return WaitForSingleObject(sem->sem, 0) == WAIT_OBJECT_0;
}
#else /* !defined(__APPLE__) && !defined(_WIN32) */