siglongjmp.c 248 字节
Newer Older
R
Rich Felker 已提交
1 2 3
#include <setjmp.h>
#include <signal.h>
#include <stdlib.h>
4
#include "syscall.h"
R
Rich Felker 已提交
5

6
_Noreturn void siglongjmp(sigjmp_buf buf, int ret)
R
Rich Felker 已提交
7
{
8
	if (buf->__fl) __syscall(SYS_rt_sigprocmask, SIG_SETMASK,
9
		buf->__ss, 0, _NSIG/8);
10
	longjmp(buf->__jb, ret);
R
Rich Felker 已提交
11
}