Commit 36616dd2 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

new version with fixes from Rob Richards Daniel

* threads.c: new version with fixes from Rob Richards
Daniel
parent 62121e2b
Fri Feb 25 08:31:16 CET 2005 Daniel Veillard <daniel@veillard.com>
* threads.c: new version with fixes from Rob Richards
Thu Feb 24 16:37:51 CET 2005 Daniel Veillard <daniel@veillard.com>
 
* threads.c: applied patch from Rich Salz for multithreading on
......
......@@ -109,8 +109,8 @@ static DWORD globalkey = TLS_OUT_OF_INDEXES;
static DWORD mainthread;
static struct
{
int32 done;
int32; control;
DWORD done;
DWORD control;
} run_once = { 0, 0 };
/* endif HAVE_WIN32_THREADS */
#elif defined HAVE_BEOS_THREADS
......@@ -699,7 +699,7 @@ xmlOnceInit(void) {
#if defined(HAVE_WIN32_THREADS)
if (!run_once.done) {
if (InterlockedIncrement(&run_once.control) == 0)
if (InterlockedIncrement(&run_once.control) == 1)
{
#if !defined(HAVE_COMPILER_TLS)
globalkey = TlsAlloc();
......
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