Make _Thread_local more seamlessly working

This commit is contained in:
Justine Tunney 2022-07-10 08:27:50 -07:00
parent 5f4f6b0e69
commit 5fa77f1e8f
23 changed files with 217 additions and 283 deletions

View file

@ -19,6 +19,7 @@
#define ShouldUseMsabiAttribute() 1
#include "libc/bits/asmflag.h"
#include "libc/calls/internal.h"
#include "libc/calls/strace.internal.h"
#include "libc/calls/struct/sigset.h"
#include "libc/dce.h"
#include "libc/errno.h"
@ -58,6 +59,7 @@ static privileged void __morph_mprotect(void *addr, size_t size, int prot,
*/
privileged void __morph_begin(void) {
sigset_t ss = {{-1, -1}};
STRACE("__morph_begin()");
if (!IsWindows()) {
sys_sigprocmask(SIG_BLOCK, &ss, &oldss);
}
@ -74,4 +76,5 @@ privileged void __morph_end(void) {
if (!IsWindows()) {
sys_sigprocmask(SIG_SETMASK, &oldss, 0);
}
STRACE("__morph_end()");
}