diff options
author | 2020-12-11 19:48:58 +0000 | |
---|---|---|
committer | 2020-12-11 19:48:58 +0000 | |
commit | 9482363acd188e1112b816b82d93ba113b2e17e2 (patch) | |
tree | 5f0c25ba34c8e0f54cd8ee1ca33d28851124e659 | |
parent | Introduce query_imsg2str() to simplify printing "qname class type". (diff) | |
download | wireguard-openbsd-9482363acd188e1112b816b82d93ba113b2e17e2.tar.xz wireguard-openbsd-9482363acd188e1112b816b82d93ba113b2e17e2.zip |
ipmi(4): ipmi_poll_thread(): remove sleep loop
This tsleep_nsec(9) call does not set PCATCH and there are no other
threads calling wakeup(9) so there is no need to spin until we get
EWOULDBLOCK. It always returns EWOULDBLOCK.
Idea from claudio@.
ok claudio@
-rw-r--r-- | sys/dev/ipmi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c index 62e1ddad566..cb99a063deb 100644 --- a/sys/dev/ipmi.c +++ b/sys/dev/ipmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipmi.c,v 1.113 2020/12/11 04:00:33 cheloha Exp $ */ +/* $OpenBSD: ipmi.c,v 1.114 2020/12/11 19:48:58 cheloha Exp $ */ /* * Copyright (c) 2015 Masao Uebayashi @@ -1497,9 +1497,7 @@ ipmi_poll_thread(void *arg) printf("%s: no SDRs IPMI disabled\n", DEVNAME(sc)); goto done; } - while (tsleep_nsec(sc, PWAIT, "ipmirun", - MSEC_TO_NSEC(1)) != EWOULDBLOCK) - continue; + tsleep_nsec(sc, PWAIT, "ipmirun", MSEC_TO_NSEC(1)); } /* initialize sensor list for thread */ |