Skip to content

Commit

Permalink
i#58 MacOS: fix bug in semaphore_create call
Browse files Browse the repository at this point in the history
SVN-Revision: 2475
  • Loading branch information
derekbruening committed Jan 9, 2014
1 parent ed456ad commit 9e587f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/unix/ksynch_macos.c
@@ -1,5 +1,5 @@
/* *******************************************************************************
* Copyright (c) 2013 Google, Inc. All rights reserved.
* Copyright (c) 2013-2014 Google, Inc. All rights reserved.
* *******************************************************************************/

/*
Expand Down Expand Up @@ -76,7 +76,7 @@ ksynch_init_var(mac_synch_t *synch)
* no thread waiting at that precise point.
*/
kern_return_t res = semaphore_create(mach_task_self(), &synch->sem,
SYNC_POLICY_PREPOST, -1);
SYNC_POLICY_PREPOST, 0);
ASSERT(synch->sem != 0); /* we assume 0 is never a legitimate value */
synch->value = 0;
return (res == KERN_SUCCESS);
Expand Down

0 comments on commit 9e587f6

Please sign in to comment.