diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2010-01-24 22:20:36 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2010-01-24 22:20:36 +0000 |
| commit | a32477f71af5103697a0441eaecb74537e2211db (patch) | |
| tree | d40c0ae4acd34c8a698d734ebbd750ecda99d30d | |
| parent | a14e285dfe8ef760f76a2cf4e98b74820efbbf9d (diff) | |
| download | PROJ-a32477f71af5103697a0441eaecb74537e2211db.tar.gz PROJ-a32477f71af5103697a0441eaecb74537e2211db.zip | |
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
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | src/pj_mutex.c | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2010-01-25 Frank Warmerdam <warmerdam@pobox.com> + + * 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 <warmerdam@pobox.com> * 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 |
