diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-03-08 18:17:08 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-03-08 18:17:08 +0100 |
| commit | 3937fc4b7172d69e6573ca8756a0b6824d460cbf (patch) | |
| tree | 48306f6aa51b3cb93b5296af0d5ecf787814e99a /src | |
| parent | 5debac4c98c1c5c262f5cae3f0cdee8527ef06a6 (diff) | |
| download | box64-3937fc4b7172d69e6573ca8756a0b6824d460cbf.tar.gz box64-3937fc4b7172d69e6573ca8756a0b6824d460cbf.zip | |
[DYNAREC] Small changeon the critical section handling of custommem
Diffstat (limited to 'src')
| -rw-r--r-- | src/custommem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/custommem.c b/src/custommem.c index fd22929d..3055a1ef 100644 --- a/src/custommem.c +++ b/src/custommem.c @@ -375,12 +375,13 @@ static sigset_t critical_prot = {0}; #define UNLOCK_PROT() if(defered_prot_p) { \ uintptr_t p = defered_prot_p; size_t sz = defered_prot_sz; uint32_t prot = defered_prot_prot; \ defered_prot_p = 0; \ + pthread_sigmask(SIG_SETMASK, &old_sig, NULL); \ mutex_unlock(&mutex_prot); \ setProtection(p, sz, prot); \ } else { \ + pthread_sigmask(SIG_SETMASK, &old_sig, NULL); \ mutex_unlock(&mutex_prot); \ - } \ - pthread_sigmask(SIG_SETMASK, &old_sig, NULL) + } #define UNLOCK_PROT_READ() mutex_unlock(&mutex_prot); pthread_sigmask(SIG_SETMASK, &old_sig, NULL) |