summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2019-12-19 17:40:10 +0000
committermpi <mpi@openbsd.org>2019-12-19 17:40:10 +0000
commitbabb761de1ba2d43bc3717c713c02b0d14e11db2 (patch)
treeb91dc29659e146a7f8c9888c966cb7aea48344d4 /sys/kern/kern_exit.c
parentwider list width to adjust for previous; (diff)
downloadwireguard-openbsd-babb761de1ba2d43bc3717c713c02b0d14e11db2.tar.xz
wireguard-openbsd-babb761de1ba2d43bc3717c713c02b0d14e11db2.zip
Convert infinite sleeps to {m,t}sleep_nsec(9).
ok visa@
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index ac16ed1e489..3f851fd2a9a 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.181 2019/12/11 07:30:09 guenther Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.182 2019/12/19 17:40:10 mpi Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -164,7 +164,7 @@ exit1(struct proc *p, int xexit, int xsig, int flags)
if ((p->p_flag & P_THREAD) == 0) {
/* main thread gotta wait because it has the pid, et al */
while (pr->ps_refcnt > 1)
- tsleep(&pr->ps_threads, PWAIT, "thrdeath", 0);
+ tsleep_nsec(&pr->ps_threads, PWAIT, "thrdeath", INFSLP);
if (pr->ps_flags & PS_PROFIL)
stopprofclock(pr);
}
@@ -412,7 +412,8 @@ reaper(void *arg)
for (;;) {
mtx_enter(&deadproc_mutex);
while ((p = LIST_FIRST(&deadproc)) == NULL)
- msleep(&deadproc, &deadproc_mutex, PVM, "reaper", 0);
+ msleep_nsec(&deadproc, &deadproc_mutex, PVM, "reaper",
+ INFSLP);
/* Remove us from the deadproc list. */
LIST_REMOVE(p, p_hash);
@@ -567,7 +568,7 @@ loop:
retval[0] = 0;
return (0);
}
- if ((error = tsleep(q->p_p, PWAIT | PCATCH, "wait", 0)) != 0)
+ if ((error = tsleep_nsec(q->p_p, PWAIT | PCATCH, "wait", INFSLP)) != 0)
return (error);
goto loop;
}