removed previous change that allowed w95, but introduced a bug

This commit is contained in:
Jeff Hill
2002-10-29 22:03:34 +00:00
parent 61b6f8cdd9
commit 66a58406cc
+5 -8
View File
@@ -402,14 +402,11 @@ static void epicsThreadInit ( void )
return;
}
#if 1
/* not arch neutral, but at least supported by w95 and borland */
if ( InterlockedExchange ( (LPLONG) &win32ThreadGlobalMutex, (LONG) win32ThreadGlobalMutexTmp ) ) {
#else
/* not supported on W95, but the alternative requires assuming that pointer and integer are the same */
if ( InterlockedCompareExchange ( (PVOID *) &win32ThreadGlobalMutex,
(PVOID) win32ThreadGlobalMutexTmp, (PVOID)0 ) != 0) {
#endif
/*
* not supported on W95 but supported on Borland 551
*/
if ( InterlockedCompareExchangePointer ( &win32ThreadGlobalMutex,
win32ThreadGlobalMutexTmp, 0 ) != 0) {
CloseHandle (win32ThreadGlobalMutexTmp);
/* wait for init to complete */
status = WaitForSingleObject ( win32ThreadGlobalMutex, INFINITE );