mirror of
https://github.com/GNOME/libxml2.git
synced 2025-03-13 18:47:01 +08:00
fixing bug #120870 try to avoid problem with uninitialized mutexes Daniel
* globals.c threads.c: fixing bug #120870 try to avoid problem with uninitialized mutexes Daniel
This commit is contained in:
parent
1ac24d36b1
commit
5805be2921
@ -1,3 +1,8 @@
|
||||
Thu Aug 28 10:01:44 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* globals.c threads.c: fixing bug #120870 try to avoid problem
|
||||
with uninitialized mutexes
|
||||
|
||||
Wed Aug 27 16:12:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* relaxng.c: fixed an error reporting bug in Relax-NG when we end
|
||||
|
@ -480,6 +480,9 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
|
||||
/*
|
||||
* Perform initialization as required by libxml
|
||||
*/
|
||||
if (xmlThrDefMutex == NULL)
|
||||
xmlInitGlobals();
|
||||
|
||||
xmlMutexLock(xmlThrDefMutex);
|
||||
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
|
@ -170,8 +170,10 @@ xmlMutexLock(xmlMutexPtr tok)
|
||||
* xmlMutexUnlock() is used to unlock a libxml2 token.
|
||||
*/
|
||||
void
|
||||
xmlMutexUnlock(xmlMutexPtr tok ATTRIBUTE_UNUSED)
|
||||
xmlMutexUnlock(xmlMutexPtr tok)
|
||||
{
|
||||
if (tok == NULL)
|
||||
return;
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
pthread_mutex_unlock(&tok->lock);
|
||||
#elif defined HAVE_WIN32_THREADS
|
||||
|
Loading…
x
Reference in New Issue
Block a user