chiark / gitweb /
[PATCH] sync klibc with release 0.95
[elogind.git] / klibc / klibc / siglongjmp.c
1 /*
2  * siglongjmp.c
3  *
4  * sigsetjmp() is a macro, by necessity (it's either that or write
5  * it in assembly), but siglongjmp() is a normal function.
6  */
7
8 #include <setjmp.h>
9 #include <signal.h>
10
11 __noreturn siglongjmp(sigjmp_buf buf, int retval)
12 {
13   sigprocmask(SIG_SETMASK, &buf->__sigs, NULL);
14   longjmp(buf->__jmpbuf, retval);
15 }
16