diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-10-26 13:48:28 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-10-26 13:48:28 +0200 |
| commit | bf75d6496f411bbbacc2d0687a32f0043c704438 (patch) | |
| tree | 55ef5368d12fcc742758a9cb11321c339719de19 /src/box64context.c | |
| parent | fb7f134c064b189d3f91606a9257360e7be789c3 (diff) | |
| download | box64-bf75d6496f411bbbacc2d0687a32f0043c704438.tar.gz box64-bf75d6496f411bbbacc2d0687a32f0043c704438.zip | |
Made a custom implementation of pthread_once
Diffstat (limited to 'src/box64context.c')
| -rwxr-xr-x | src/box64context.c | 8 |
1 files changed, 0 insertions, 8 deletions
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<<B); \ } - GO(my_context->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<<B)) \ pthread_mutex_trylock(&A); \ - GO(my_context->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); |