projects
/
platform
/
upstream
/
libxml2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.9.2
[platform/upstream/libxml2.git]
/
threads.c
diff --git
a/threads.c
b/threads.c
index
f2f2703
..
8921204
100644
(file)
--- a/
threads.c
+++ b/
threads.c
@@
-378,7
+378,7
@@
xmlRMutexLock(xmlRMutexPtr tok)
pthread_mutex_unlock(&tok->lock);
#elif defined HAVE_WIN32_THREADS
EnterCriticalSection(&tok->cs);
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++;
#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
}
pthread_mutex_unlock(&tok->lock);
#elif defined HAVE_WIN32_THREADS
- if (
!--tok->count)
+ if (
tok->count > 0) {
LeaveCriticalSection(&tok->cs);
LeaveCriticalSection(&tok->cs);
+ tok->count--;
+ }
#elif defined HAVE_BEOS_THREADS
if (tok->lock->tid == find_thread(NULL)) {
tok->count--;
#elif defined HAVE_BEOS_THREADS
if (tok->lock->tid == find_thread(NULL)) {
tok->count--;