From a32477f71af5103697a0441eaecb74537e2211db Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Sun, 24 Jan 2010 22:20:36 +0000 Subject: correction mutex creation on win32 to be in unlocked state (#63) git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1788 4e78687f-474d-0410-85f9-8d5e500ac6b2 --- ChangeLog | 5 +++++ src/pj_mutex.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4bf6d7a9..959b33a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-25 Frank Warmerdam + + * src/pj_mutex.c: fix creation of mutex on win32 to be in + unacquired state in pj_init_lock to avoid an extra reference. (#63) + 2009-10-19 Frank Warmerdam * nad/ntf_r93.gsb: updated with file from IGN (#52). diff --git a/src/pj_mutex.c b/src/pj_mutex.c index 60d6fc74..3399ac12 100644 --- a/src/pj_mutex.c +++ b/src/pj_mutex.c @@ -181,8 +181,8 @@ void pj_release_lock() { if( mutex_lock == NULL ) pj_init_lock(); - - ReleaseMutex( mutex_lock ); + else + ReleaseMutex( mutex_lock ); } /************************************************************************/ @@ -205,7 +205,7 @@ static void pj_init_lock() { if( mutex_lock == NULL ) - mutex_lock = CreateMutex( NULL, TRUE, NULL ); + mutex_lock = CreateMutex( NULL, FALSE, NULL ); } #endif // def MUTEX_win32 -- cgit v1.2.3