# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1317355238 0 # Node ID 5c1a01c6384da8ededbf128d33a11acb9f1ac1a9 # Parent 196cd8a8e6a87c209562264ed7bbc8d020fef8b9 Think we need to check the posted state inside the mutex... Also if it is already posted, we should return DW_ERROR_NONE. This will need to be committed for Unix too. diff -r 196cd8a8e6a8 -r 5c1a01c6384d mac/dw.m --- a/mac/dw.m Fri Sep 30 03:32:26 2011 +0000 +++ b/mac/dw.m Fri Sep 30 04:00:38 2011 +0000 @@ -8573,10 +8573,14 @@ if(!eve) return DW_ERROR_NON_INIT; + pthread_mutex_lock (&(eve->mutex)); + if(eve->posted) - return DW_ERROR_GENERAL; + { + pthread_mutex_unlock (&(eve->mutex)); + return DW_ERROR_NONE; + } - pthread_mutex_lock (&(eve->mutex)); if(timeout != -1) { struct timeval now;