Mercurial > dwindows
changeset 1202:5c1a01c6384d
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.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 30 Sep 2011 04:00:38 +0000 |
parents | 196cd8a8e6a8 |
children | fc87309372ef |
files | mac/dw.m |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;