syntax updates
This commit is contained in:
parent
cfdaa1185f
commit
4799f0d9be
@ -25,17 +25,16 @@ static BOOL CALLBACK _pthread_once_win32_cb(PINIT_ONCE once, PVOID param, PVOID
|
|||||||
{
|
{
|
||||||
void (*cb) (void) = param;
|
void (*cb) (void) = param;
|
||||||
cb();
|
cb();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pthread_once(pthread_once_t *once, void (*cb) (void))
|
static int pthread_once(pthread_once_t *once, void (*cb) (void))
|
||||||
{
|
{
|
||||||
BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, cb, NULL);
|
BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, cb, NULL);
|
||||||
if (rc == 0) {
|
if (rc == 0)
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user