Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_sig.c
Show First 20 Lines • Show All 1,262 Lines • ▼ Show 20 Lines | kern_sigtimedwait(struct thread *td, sigset_t waitset, ksiginfo_t *ksi, | ||||
bool traced; | bool traced; | ||||
p = td->td_proc; | p = td->td_proc; | ||||
error = 0; | error = 0; | ||||
ets.tv_sec = 0; | ets.tv_sec = 0; | ||||
ets.tv_nsec = 0; | ets.tv_nsec = 0; | ||||
traced = false; | traced = false; | ||||
/* Ensure the sigfastblock value is up to date. */ | |||||
sigfastblock_fetch(td); | |||||
if (timeout != NULL) { | if (timeout != NULL) { | ||||
if (timeout->tv_nsec >= 0 && timeout->tv_nsec < 1000000000) { | if (timeout->tv_nsec >= 0 && timeout->tv_nsec < 1000000000) { | ||||
timevalid = 1; | timevalid = 1; | ||||
getnanouptime(&rts); | getnanouptime(&rts); | ||||
timespecadd(&rts, timeout, &ets); | timespecadd(&rts, timeout, &ets); | ||||
} | } | ||||
} | } | ||||
ksiginfo_init(ksi); | ksiginfo_init(ksi); | ||||
▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | sys_sigsuspend(struct thread *td, struct sigsuspend_args *uap) | ||||
return (kern_sigsuspend(td, mask)); | return (kern_sigsuspend(td, mask)); | ||||
} | } | ||||
int | int | ||||
kern_sigsuspend(struct thread *td, sigset_t mask) | kern_sigsuspend(struct thread *td, sigset_t mask) | ||||
{ | { | ||||
struct proc *p = td->td_proc; | struct proc *p = td->td_proc; | ||||
int has_sig, sig; | int has_sig, sig; | ||||
/* Ensure the sigfastblock value is up to date. */ | |||||
sigfastblock_fetch(td); | |||||
/* | /* | ||||
* When returning from sigsuspend, we want | * When returning from sigsuspend, we want | ||||
* the old mask to be restored after the | * the old mask to be restored after the | ||||
* signal handler has finished. Thus, we | * signal handler has finished. Thus, we | ||||
* save it here and mark the sigacts structure | * save it here and mark the sigacts structure | ||||
* to indicate this. | * to indicate this. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 2,717 Lines • Show Last 20 Lines |