Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions sources/setjmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ void longjmp(jmp_buf buf, int val)
}


int sigsetjmp(jmp_buf buf, int mask)
{
return setjmp(buf);
}
/*
* sigsetjmp() must not call setjmp(), otherwise the context of sigsetjmp()
* itself would be saved, which no longer exists when longjmp() is called.
* Signal masks are not supported, so the mask argument is simply ignored,
* which is safe with the caller-pops-arguments calling convention.
*/
#if __GNUC__ >= 8
#pragma GCC diagnostic ignored "-Wattribute-alias"
#endif
int sigsetjmp(jmp_buf buf, int mask) __attribute__((alias("setjmp")));

#endif
Loading