10 #include <sys/signal.h>
11 #include <machine/signal.h>
13 int sigreturn(struct sigcontext
*scp
)
17 /* The message can't be on the stack, because the stack will vanish out
18 * from under us. The send part of ipc_sendrec will succeed, but when
19 * a message is sent to restart the current process, who knows what will
20 * be in the place formerly occupied by the message?
24 /* Protect against race conditions by blocking all interrupts. */
25 sigfillset(&set
); /* splhi */
26 sigprocmask(SIG_SETMASK
, &set
, NULL
);
28 memset(&m
, 0, sizeof(m
));
29 m
.m_lc_pm_sigset
.set
= scp
->sc_mask
;
30 m
.m_lc_pm_sigset
.ctx
= (vir_bytes
)scp
;
31 return(_syscall(PM_PROC_NR
, PM_SIGRETURN
, &m
)); /* normally doesn't return */