diff options
| -rw-r--r-- | include/compat/pthread.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/compat/pthread.h b/include/compat/pthread.h index 8edb806..19eea13 100644 --- a/include/compat/pthread.h +++ b/include/compat/pthread.h | |||
| @@ -25,17 +25,16 @@ static BOOL CALLBACK _pthread_once_win32_cb(PINIT_ONCE once, PVOID param, PVOID | |||
| 25 | { | 25 | { |
| 26 | void (*cb) (void) = param; | 26 | void (*cb) (void) = param; |
| 27 | cb(); | 27 | cb(); |
| 28 | return TRUE; | 28 | return TRUE; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | static int pthread_once(pthread_once_t *once, void (*cb) (void)) | 31 | static int pthread_once(pthread_once_t *once, void (*cb) (void)) |
| 32 | { | 32 | { |
| 33 | BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, cb, NULL); | 33 | BOOL rc = InitOnceExecuteOnce(&once->once, _pthread_once_win32_cb, cb, NULL); |
| 34 | if (rc == 0) { | 34 | if (rc == 0) |
| 35 | return -1; | 35 | return -1; |
| 36 | } else { | 36 | else |
| 37 | return 0; | 37 | return 0; |
| 38 | } | ||
| 39 | } | 38 | } |
| 40 | 39 | ||
| 41 | #else | 40 | #else |
