diff options
author | Aron Xu <aron@debian.org> | 2015-09-21 22:55:55 +0800 |
---|---|---|
committer | Aron Xu <aron@debian.org> | 2015-09-21 22:55:55 +0800 |
commit | e85cf827a804d9abf4cbf48af6394c49331de322 (patch) | |
tree | aab761b5168447ea51ad1a64c9e1594e48f84b12 /threads.c | |
parent | 4b692ee8530176868e4832e30bdc4ba5bc145948 (diff) | |
download | libxml2-e85cf827a804d9abf4cbf48af6394c49331de322.tar.gz |
Revert "Merge tag 'upstream/2.9.1+dfsg1'"
This reverts commit 21ee18bdbc9a9d4500e12a1399d51c593b8b31d4, reversing
changes made to de338c1adfa336ddb5177ceb5c63bcd868a0ebc7.
Diffstat (limited to 'threads.c')
-rw-r--r-- | threads.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -378,7 +378,7 @@ xmlRMutexLock(xmlRMutexPtr tok) pthread_mutex_unlock(&tok->lock); #elif defined HAVE_WIN32_THREADS EnterCriticalSection(&tok->cs); - ++tok->count; + tok->count++; #elif defined HAVE_BEOS_THREADS if (tok->lock->tid == find_thread(NULL)) { tok->count++; @@ -414,8 +414,10 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED) } pthread_mutex_unlock(&tok->lock); #elif defined HAVE_WIN32_THREADS - if (!--tok->count) + if (tok->count > 0) { LeaveCriticalSection(&tok->cs); + tok->count--; + } #elif defined HAVE_BEOS_THREADS if (tok->lock->tid == find_thread(NULL)) { tok->count--; |