From d19c38149f0fbd50f0bf35227ef485d2f81c8721 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 30 Dec 2019 23:56:27 +0000 Subject: convert infinite msleep(9) to msleep_nsec(9) ok mpi@ --- sys/kern/kern_smr.c | 6 +++--- sys/kern/subr_autoconf.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_smr.c b/sys/kern/kern_smr.c index ffe7b9b5527..51165b0c3c8 100644 --- a/sys/kern/kern_smr.c +++ b/sys/kern/kern_smr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_smr.c,v 1.5 2019/07/03 22:39:33 cheloha Exp $ */ +/* $OpenBSD: kern_smr.c,v 1.6 2019/12/30 23:56:26 jsg Exp $ */ /* * Copyright (c) 2019 Visa Hankala @@ -96,8 +96,8 @@ smr_thread(void *arg) mtx_enter(&smr_lock); if (smr_ndeferred == 0) { while (smr_ndeferred == 0) - msleep(&smr_ndeferred, &smr_lock, PVM, - "bored", 0); + msleep_nsec(&smr_ndeferred, &smr_lock, PVM, + "bored", INFSLP); } else { if (smr_expedite == 0) msleep_nsec(&smr_ndeferred, &smr_lock, PVM, diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index d7402f8b6c3..3afae3a67e3 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_autoconf.c,v 1.93 2018/12/05 15:44:22 mpi Exp $ */ +/* $OpenBSD: subr_autoconf.c,v 1.94 2019/12/30 23:56:26 jsg Exp $ */ /* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */ /* @@ -343,8 +343,8 @@ config_attach(struct device *parent, void *match, void *aux, cfprint_t print) mtx_enter(&autoconf_attdet_mtx); while (autoconf_attdet < 0) - msleep(&autoconf_attdet, &autoconf_attdet_mtx, - PWAIT, "autoconf", 0); + msleep_nsec(&autoconf_attdet, &autoconf_attdet_mtx, + PWAIT, "autoconf", INFSLP); autoconf_attdet++; mtx_leave(&autoconf_attdet_mtx); @@ -510,8 +510,8 @@ config_detach(struct device *dev, int flags) mtx_enter(&autoconf_attdet_mtx); while (autoconf_attdet > 0) - msleep(&autoconf_attdet, &autoconf_attdet_mtx, - PWAIT, "autoconf", 0); + msleep_nsec(&autoconf_attdet, &autoconf_attdet_mtx, + PWAIT, "autoconf", INFSLP); autoconf_attdet--; mtx_leave(&autoconf_attdet_mtx); -- cgit v1.2.3