diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2010-03-28 22:13:28 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2010-03-28 22:13:28 +0000 |
| commit | c2525b5c8843ee08c7300ad808076c6287eef7b4 (patch) | |
| tree | 0ebeec5ca4ce00ff39ef03303971ba29a37a81e2 | |
| parent | a9a6974b4c419762f9fa927a0b9b8397c74bd5f0 (diff) | |
| download | PROJ-c2525b5c8843ee08c7300ad808076c6287eef7b4.tar.gz PROJ-c2525b5c8843ee08c7300ad808076c6287eef7b4.zip | |
correct mutex creation on win32 to be in unlocked state (#63)4.7
git-svn-id: http://svn.osgeo.org/metacrs/proj/branches/4.7@1832 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-09-24 Frank Warmerdam <warmerdam@pobox.com> * nad/Makefile.am: add ntv2 and ignf testing if grid shift files 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 |
