diff options
Diffstat (limited to 'src/libtools/threads.c')
| -rwxr-xr-x | src/libtools/threads.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libtools/threads.c b/src/libtools/threads.c index 25480a47..01f3a7c4 100755 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -674,6 +674,9 @@ static void* findcleanup_routineFct(void* fct) static __thread uintptr_t my_once_callback_fct = 0; int EXPORT my_pthread_once(x64emu_t* emu, int* once, void* cb) { + if(*once) // quick test first + return 0; + // slow test now #ifdef DYNAREC int old = native_lock_xchg_d(once, 1); #else |