diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-07-05 11:35:27 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-07-05 11:35:27 +0200 |
| commit | c3cd14f3c529d75de5130facc3542f4a0f56d7f9 (patch) | |
| tree | d936a68ddb784f69511274c139848feba67bf9bc /src/box64context.c | |
| parent | 2010f8dcce4349e1420755a94f9af2211e9574c8 (diff) | |
| download | box64-c3cd14f3c529d75de5130facc3542f4a0f56d7f9.tar.gz box64-c3cd14f3c529d75de5130facc3542f4a0f56d7f9.zip | |
Removed mutex per bridge and use a global one (remove chance of freeze on fork)
Diffstat (limited to 'src/box64context.c')
| -rwxr-xr-x | src/box64context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/box64context.c b/src/box64context.c index c3b228e6..5dc64825 100755 --- a/src/box64context.c +++ b/src/box64context.c @@ -88,6 +88,7 @@ int unlockMutex() #endif GO(my_context->mutex_tls, 9) GO(my_context->mutex_thread, 10) + GO(my_context->mutex_bridge, 11) #undef GO return ret; @@ -110,6 +111,7 @@ void relockMutex(int locks) #endif GO(my_context->mutex_tls, 9) GO(my_context->mutex_thread, 10) + GO(my_context->mutex_bridge, 11) #undef GO } @@ -128,6 +130,7 @@ static void init_mutexes(box64context_t* context) #endif pthread_mutex_init(&context->mutex_tls, &attr); pthread_mutex_init(&context->mutex_thread, &attr); + pthread_mutex_init(&context->mutex_bridge, &attr); pthread_mutexattr_destroy(&attr); } @@ -268,6 +271,7 @@ void FreeBox64Context(box64context_t** context) #endif pthread_mutex_destroy(&ctx->mutex_tls); pthread_mutex_destroy(&ctx->mutex_thread); + pthread_mutex_destroy(&ctx->mutex_bridge); free_neededlib(&ctx->neededlibs); |