diff options
| author | 2014-07-12 21:21:19 +0000 | |
|---|---|---|
| committer | 2014-07-12 21:21:19 +0000 | |
| commit | f6022b25f901b35b6563820a75aae00925b68635 (patch) | |
| tree | 1f2906161c9d8cf567276ae1451a962e76ff8952 /sys/kern/sys_generic.c | |
| parent | Remove this sentence: (diff) | |
| download | wireguard-openbsd-f6022b25f901b35b6563820a75aae00925b68635.tar.xz wireguard-openbsd-f6022b25f901b35b6563820a75aae00925b68635.zip | |
Refactor out dosigsuspend() function
Discussed with guenther and kettenis
Diffstat (limited to 'sys/kern/sys_generic.c')
| -rw-r--r-- | sys/kern/sys_generic.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index b94b7dd4f8f..63d2ccb58d2 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.89 2014/07/12 18:43:32 tedu Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.90 2014/07/12 21:21:19 matthew Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -657,11 +657,8 @@ dopselect(struct proc *p, int nd, fd_set *in, fd_set *ou, fd_set *ex, } timo = 0; - if (sigmask) { - p->p_oldmask = p->p_sigmask; - atomic_setbits_int(&p->p_flag, P_SIGSUSPEND); - p->p_sigmask = *sigmask &~ sigcantmask; - } + if (sigmask) + dosigsuspend(p, *sigmask &~ sigcantmask); retry: ncoll = nselcoll; @@ -965,11 +962,8 @@ doppoll(struct proc *p, struct pollfd *fds, u_int nfds, } timo = 0; - if (sigmask) { - p->p_oldmask = p->p_sigmask; - atomic_setbits_int(&p->p_flag, P_SIGSUSPEND); - p->p_sigmask = *sigmask &~ sigcantmask; - } + if (sigmask) + dosigsuspend(p, *sigmask &~ sigcantmask); retry: ncoll = nselcoll; |
