From bf75d6496f411bbbacc2d0687a32f0043c704438 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 26 Oct 2022 13:48:28 +0200 Subject: Made a custom implementation of pthread_once --- src/box64context.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/box64context.c') diff --git a/src/box64context.c b/src/box64context.c index e4fd522b..46860a08 100755 --- a/src/box64context.c +++ b/src/box64context.c @@ -79,8 +79,6 @@ int unlockMutex() ret|=(1<mutex_once, 5) - GO(my_context->mutex_once2, 6) GO(my_context->mutex_trace, 7) #ifdef DYNAREC GO(my_context->mutex_dyndump, 8) @@ -102,8 +100,6 @@ void relockMutex(int locks) if(locks&(1<mutex_once, 5) - GO(my_context->mutex_once2, 6) GO(my_context->mutex_trace, 7) #ifdef DYNAREC GO(my_context->mutex_dyndump, 8) @@ -121,8 +117,6 @@ static void init_mutexes(box64context_t* context) pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); - pthread_mutex_init(&context->mutex_once, &attr); - pthread_mutex_init(&context->mutex_once2, &attr); pthread_mutex_init(&context->mutex_trace, &attr); #ifndef DYNAREC pthread_mutex_init(&context->mutex_lock, &attr); @@ -292,8 +286,6 @@ void FreeBox64Context(box64context_t** context) finiAllHelpers(ctx); - pthread_mutex_destroy(&ctx->mutex_once); - pthread_mutex_destroy(&ctx->mutex_once2); pthread_mutex_destroy(&ctx->mutex_trace); #ifndef DYNAREC pthread_mutex_destroy(&ctx->mutex_lock); -- cgit 1.4.1