LibC: Fix sigsetjmp

the call from C sigsetjmp messed up rbp, now sigsetjmp is also written
in assembly.

I did not test the 32 bit code, just ported the tested 64 bit version
over :D
This commit is contained in:
2025-08-20 20:40:17 +03:00
parent 0dfe0b7023
commit 1d6c08478d
3 changed files with 42 additions and 11 deletions

View File

@@ -7,13 +7,5 @@ void siglongjmp(sigjmp_buf env, int val)
{
if (env[_JMP_BUF_REGS])
pthread_sigmask(SIG_SETMASK, reinterpret_cast<sigset_t*>(&env[_JMP_BUF_REGS + 1]), nullptr);
return longjmp(env, val);
}
int sigsetjmp(sigjmp_buf env, int savemask)
{
env[_JMP_BUF_REGS] = savemask;
if (savemask)
pthread_sigmask(0, nullptr, reinterpret_cast<sigset_t*>(&env[_JMP_BUF_REGS + 1]));
return setjmp(env);
longjmp(env, val);
}