From 3937fc4b7172d69e6573ca8756a0b6824d460cbf Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 8 Mar 2024 18:17:08 +0100 Subject: [DYNAREC] Small changeon the critical section handling of custommem --- src/custommem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit 1.4.1