summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2020-01-09 14:35:19 +0000
committermpi <mpi@openbsd.org>2020-01-09 14:35:19 +0000
commit8544fed635bef6da5ca66aee325c8c32d14631c5 (patch)
treeac707a4678633c4a36b1342116e222baebf6cf5e /sys/kern/tty.c
parentReplace entropy.c, random.c and an outdated arc4random copy with (diff)
downloadwireguard-openbsd-8544fed635bef6da5ca66aee325c8c32d14631c5.tar.xz
wireguard-openbsd-8544fed635bef6da5ca66aee325c8c32d14631c5.zip
Convert sleeps of 1sec or more to tsleep_nsec(9).
ok bluhm@
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 5ada4fd2b6c..ffc4d120e84 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.150 2020/01/08 16:27:41 visa Exp $ */
+/* $OpenBSD: tty.c,v 1.151 2020/01/09 14:35:20 mpi Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -1715,7 +1715,8 @@ ttycheckoutq(struct tty *tp, int wait)
return (0);
}
SET(tp->t_state, TS_ASLEEP);
- tsleep(&tp->t_outq, PZERO - 1, "ttckoutq", hz);
+ tsleep_nsec(&tp->t_outq, PZERO - 1, "ttckoutq",
+ SEC_TO_NSEC(1));
}
splx(s);
return (1);