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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user