Commit 59002e7b authored by William M. Brack's avatar William M. Brack

Fixed multithreading problem

parent de2a67b4
Sat Jul 5 00:51:30 HKT 2003 William Brack <wbrack@mmm.com.hk>
Fixed problem with multi-threading, shown by the test program
testThreads. After fix, ran mutiple tests on various speed
machines (single and dual processor X86), which all seem okay.
* catalog.c: added missing xmlRMutexUnlock in xmlLoadCatalog
* threads.c: added missing initialisation for condition variable
in xmlNewRMutex.
Sat Jun 21 16:10:24 CEST 2003 Daniel Veillard <daniel@veillard.com>
Applying IPv6 patch from Archana Shah <archana.shah@wipro.com>
......
......@@ -2909,8 +2909,10 @@ xmlLoadCatalog(const char *filename)
if (xmlDefaultCatalog == NULL) {
catal = xmlLoadACatalog(filename);
if (catal == NULL)
if (catal == NULL) {
xmlRMutexUnlock(xmlCatalogMutex);
return(-1);
}
xmlDefaultCatalog = catal;
xmlRMutexUnlock(xmlCatalogMutex);
......
......@@ -196,6 +196,7 @@ xmlNewRMutex(void)
pthread_mutex_init(&tok->lock, NULL);
tok->held = 0;
tok->waiters = 0;
pthread_cond_init(&tok->cv, NULL);
#elif defined HAVE_WIN32_THREADS
InitializeCriticalSection(&tok->cs);
tok->count = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment