summaryrefslogtreecommitdiff
path: root/pthread_once.c
diff options
context:
space:
mode:
authorrpj <rpj>2005-06-03 14:47:46 +0000
committerrpj <rpj>2005-06-03 14:47:46 +0000
commit387fbc0028e84462e7470fa60926cc438a7d2bdd (patch)
tree9864bafbe96dfae45391c89c97723813190eef31 /pthread_once.c
parentcd3c708380761302fb5ffc6531d396f71b706b4f (diff)
''
Diffstat (limited to 'pthread_once.c')
-rw-r--r--pthread_once.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pthread_once.c b/pthread_once.c
index aa09d99..96d45f2 100644
--- a/pthread_once.c
+++ b/pthread_once.c
@@ -60,7 +60,7 @@ pthread_once (pthread_once_t * once_control, void (*init_routine) (void))
ptw32_mcs_lock_acquire((ptw32_mcs_lock_t *)&once_control->lock, &node);
- if (!InterlockedExchangeAdd((LPLONG)&once_control->done, 0L))
+ if (!once_control->done)
{
#ifdef _MSC_VER
@@ -75,7 +75,7 @@ pthread_once (pthread_once_t * once_control, void (*init_routine) (void))
#pragma inline_depth()
#endif
- (void) PTW32_INTERLOCKED_EXCHANGE((LPLONG)&once_control->done, (LONG)PTW32_TRUE);
+ once_control->done = PTW32_TRUE;
}
ptw32_mcs_lock_release(&node);