Add siglongjmp() for aarch64

This commit is contained in:
Justine Tunney 2023-09-21 10:10:20 -07:00
parent c88f95a892
commit 22cf6e11eb
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 34 additions and 49 deletions

View file

@ -20,7 +20,6 @@
#include "libc/calls/struct/sigset.h"
#include "libc/runtime/runtime.h"
#include "libc/sysv/consts/sig.h"
#ifdef __x86_64__
// kudos rich felker for the brilliant design
int __sigsetjmp_tail(sigjmp_buf jb, int rc) {
@ -28,8 +27,6 @@ int __sigsetjmp_tail(sigjmp_buf jb, int rc) {
sizeof(sigjmp_buf) == sizeof(jmp_buf) + 8 + 8 + sizeof(sigset_t),
"please recompute sigjmp_buf w.r.t. sigset_t");
void *p = (char *)jb + sizeof(jmp_buf) + 8 + 8;
npassert(!sigprocmask(SIG_SETMASK, rc ? p : 0, rc ? 0 : p));
sigprocmask(SIG_SETMASK, rc ? p : 0, rc ? 0 : p);
return rc;
}
#endif /* __x86_64__ */