Instead of tsleep on lbolt do a tsleep with a 1 second timeout.
authorclaudio <claudio@openbsd.org>
Thu, 22 Jun 2023 13:18:02 +0000 (13:18 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 22 Jun 2023 13:18:02 +0000 (13:18 +0000)
Result is the same and gets rid of a lbolt use.
OK miod@

sys/arch/i386/i386/apm.c

index f4b891c..018185e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: apm.c,v 1.130 2023/02/10 14:34:16 visa Exp $  */
+/*     $OpenBSD: apm.c,v 1.131 2023/06/22 13:18:02 claudio Exp $       */
 
 /*-
  * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved.
@@ -907,7 +907,7 @@ apm_thread(void *v)
                rw_enter_write(&sc->sc_lock);
                (void) apm_periodic_check(sc);
                rw_exit_write(&sc->sc_lock);
-               tsleep_nsec(&lbolt, PWAIT, "apmev", INFSLP);
+               tsleep_nsec(&nowake, PWAIT, "apmev", SEC_TO_NSEC(1));
        }
 }