summaryrefslogtreecommitdiffstats
path: root/zix
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-31 03:04:47 +0000
committerDavid Robillard <d@drobilla.net>2012-01-31 03:04:47 +0000
commit17936e0b03b807a349ab86ffed10222c17aa30df (patch)
treef999aa52343ee29c5eafaa1d18fe91222c05c283 /zix
parent134faec0f97ee66807dd0a70a41f0b6a90323010 (diff)
downloadzix-17936e0b03b807a349ab86ffed10222c17aa30df.tar.gz
zix-17936e0b03b807a349ab86ffed10222c17aa30df.tar.bz2
zix-17936e0b03b807a349ab86ffed10222c17aa30df.zip
Fix ZixSem compilation on Mac OS X.
git-svn-id: http://svn.drobilla.net/zix/trunk@47 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'zix')
-rw-r--r--zix/sem.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/zix/sem.h b/zix/sem.h
index 6b66a51..0830c53 100644
--- a/zix/sem.h
+++ b/zix/sem.h
@@ -101,19 +101,20 @@ struct ZixSemImpl {
static inline ZixStatus
zix_sem_init(ZixSem* sem, unsigned initial)
{
- MPCreateSemaphore(UINT_MAX, initial, &_sem);
+ return MPCreateSemaphore(UINT_MAX, initial, &sem->sem)
+ ? ZIX_STATUS_SUCCESS : ZIX_STATUS_ERROR;
}
static inline void
zix_sem_destroy(ZixSem* sem)
{
- MPDeleteSemaphore(_sem);
+ MPDeleteSemaphore(sem->sem);
}
static inline void
zix_sem_post(ZixSem* sem)
{
- MPSignalSemaphore(_sem);
+ MPSignalSemaphore(sem->sem);
}
static inline void