diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-10-29 12:34:09 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-10-29 12:43:03 +0200 |
| commit | 53195e3a255d83ddebe90fedd89b6e6a4b561bd4 (patch) | |
| tree | 07afb7ac284d94bca63c14e9286c0aa20f794ccb /src/libtools | |
| parent | 09103aa52ef63094e2a24e7fb09ba94abbda8dfa (diff) | |
| download | box64-53195e3a255d83ddebe90fedd89b6e6a4b561bd4.tar.gz box64-53195e3a255d83ddebe90fedd89b6e6a4b561bd4.zip | |
Small imrpovment to custom phtread_once
Diffstat (limited to 'src/libtools')
| -rwxr-xr-x | src/libtools/threads.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libtools/threads.c b/src/libtools/threads.c index 85d5369b..25480a47 100755 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -674,7 +674,6 @@ 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) { - (void)emu; #ifdef DYNAREC int old = native_lock_xchg_d(once, 1); #else @@ -686,7 +685,7 @@ int EXPORT my_pthread_once(x64emu_t* emu, int* once, void* cb) #endif if(old) return 0; - EmuCall(thread_get_emu(), (uintptr_t)cb); // avoid DynaCall for now + EmuCall(emu, (uintptr_t)cb); // avoid DynaCall for now, functions are only used once after all return 0; } EXPORT int my___pthread_once(x64emu_t* emu, void* once, void* cb) __attribute__((alias("my_pthread_once"))); |