diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-10-30 16:34:01 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-10-30 16:34:01 +0100 |
| commit | 494c245b591cef1a34cc4d4dc52163861d4e54af (patch) | |
| tree | 5537b2c1f194739dd9e6a6132569528d364f32d9 /src | |
| parent | d87f0ea728c0ac321573cc31dfb96a45e34eb934 (diff) | |
| download | box64-494c245b591cef1a34cc4d4dc52163861d4e54af.tar.gz box64-494c245b591cef1a34cc4d4dc52163861d4e54af.zip | |
[DYNAREC] Reprotect bridge when emu is running
Diffstat (limited to 'src')
| -rwxr-xr-x | src/tools/bridge.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/bridge.c b/src/tools/bridge.c index f30c5360..5da522ec 100755 --- a/src/tools/bridge.c +++ b/src/tools/bridge.c @@ -135,7 +135,11 @@ uintptr_t AddBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N, const char* khint_t k = kh_put(bridgemap, bridge->bridgemap, (uintptr_t)fnc, &ret); kh_value(bridge->bridgemap, k) = (uintptr_t)&b->b[sz].CC; pthread_mutex_unlock(&my_context->mutex_bridge); - // no need to reprotect the block, it will be protected later if needed + #ifdef DYNAREC + // only reprotect the block when stuffs are running + if(!my_context->deferedInit) + protectDB((uintptr_t)b->b, NBRICK*sizeof(onebridge_t)); + #endif #ifdef HAVE_TRACE if(name) addBridgeName(fnc, name); |