diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-02-19 09:56:42 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-02-19 09:56:42 +0100 |
| commit | 3b8d6ef208d4a3f5d3402977b0978f9a294e8aae (patch) | |
| tree | 324182382ea7cf79e3474539d41a24dabe75f3f1 /src/libtools | |
| parent | 2e59b56f1691227e4a93ac1c2dd844adcc6334cd (diff) | |
| download | box64-3b8d6ef208d4a3f5d3402977b0978f9a294e8aae.tar.gz box64-3b8d6ef208d4a3f5d3402977b0978f9a294e8aae.zip | |
Simplified dynablock handling (reduced memory consuption)
Diffstat (limited to 'src/libtools')
| -rwxr-xr-x | src/libtools/signals.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index a3f0b796..40e9a8a7 100755 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -751,7 +751,7 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void //relockMutex(Locks); // do not relock mutex, because of the siglongjmp, whatever was running is canceled #ifdef DYNAREC if(Locks & is_dyndump_locked) - CancelBlock64(); + CancelBlock64(1); #endif siglongjmp(ejb->jmpbuf, 1); } @@ -793,7 +793,7 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void //relockMutex(Locks); // the thread will exit, so no relock there #ifdef DYNAREC if(Locks & is_dyndump_locked) - CancelBlock64(); + CancelBlock64(1); #endif exit(ret); } @@ -850,7 +850,7 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx) #ifdef DYNAREC if((Locks & is_dyndump_locked) && (sig==SIGSEGV) && current_helper) { relockMutex(Locks); - CancelBlock64(); + CancelBlock64(0); cancelFillBlock(); // Segfault inside a Fillblock, cancel it's creation... } dynablock_t* db = NULL; @@ -901,11 +901,11 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx) dynarec_log(LOG_INFO, "Dynablock unprotected, getting out!\n"); } //relockMutex(Locks); + mutex_unlock(&mutex_dynarec_prot); #ifdef DYNAREC if(Locks & is_dyndump_locked) - CancelBlock64(); + CancelBlock64(1); #endif - mutex_unlock(&mutex_dynarec_prot); siglongjmp(ejb->jmpbuf, 2); } dynarec_log(LOG_INFO, "Warning, Auto-SMC (%p for db %p/%p) detected, but jmpbuffer not ready!\n", (void*)addr, db, (void*)db->x64_addr); |