diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c index 998e8e8b789..ddd1132e7fa 100644 --- a/sys/kern/sched_bsd.c +++ b/sys/kern/sched_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sched_bsd.c,v 1.104 2025/08/01 10:53:23 claudio Exp $ */ +/* $OpenBSD: sched_bsd.c,v 1.105 2025/09/25 08:46:50 mvs Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /*- @@ -55,7 +55,6 @@ #endif uint64_t roundrobin_period; /* [I] roundrobin period (ns) */ -int lbolt; /* once a second sleep address */ struct mutex sched_lock; @@ -282,7 +281,6 @@ schedcpu(void *unused) } SCHED_UNLOCK(); } - wakeup(&lbolt); timeout_add_sec(&to, 1); } diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 11b46f210f8..9c3fb7cceec 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.181 2025/09/23 08:00:48 mpi Exp $ */ +/* $OpenBSD: tty.c,v 1.182 2025/09/25 08:46:50 mvs Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -79,7 +79,6 @@ void filt_ttywdetach(struct knote *kn); int filt_ttyexcept(struct knote *kn, long hint); void ttystats_init(struct itty **, int *, size_t *); int ttywait_nsec(struct tty *, uint64_t); -int ttysleep_nsec(struct tty *, void *, int, char *, uint64_t); /* Symbolic sleep message strings. */ char ttclos[] = "ttycls"; @@ -747,8 +746,8 @@ ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p) if (pr->ps_pgrp->pg_jobc == 0) return (EIO); pgsignal(pr->ps_pgrp, SIGTTOU, 1); - error = ttysleep(tp, &lbolt, TTOPRI | PCATCH, - ttybg); + error = ttysleep_nsec(tp, &nowake, TTOPRI | PCATCH, + ttybg, SEC_TO_NSEC(1)); if (error) return (error); } @@ -1515,7 +1514,8 @@ loop: lflag = tp->t_lflag; goto out; } pgsignal(pr->ps_pgrp, SIGTTIN, 1); - error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg); + error = ttysleep_nsec(tp, &nowake, TTIPRI | PCATCH, ttybg, + SEC_TO_NSEC(1)); if (error) goto out; goto loop; @@ -1613,8 +1613,8 @@ read: ISSET(lflag, IEXTEN | ISIG) == (IEXTEN | ISIG)) { pgsignal(tp->t_pgrp, SIGTSTP, 1); if (first) { - error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, - ttybg); + error = ttysleep_nsec(tp, &nowake, TTIPRI | PCATCH, + ttybg, SEC_TO_NSEC(1)); if (error) break; goto loop; @@ -1765,7 +1765,8 @@ loop: goto out; } pgsignal(pr->ps_pgrp, SIGTTOU, 1); - error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg); + error = ttysleep_nsec(tp, &nowake, TTIPRI | PCATCH, ttybg, + SEC_TO_NSEC(1)); if (error) goto out; goto loop; diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 956607011d1..d7effda2f4d 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.115 2024/11/05 06:03:19 jsg Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.116 2025/09/25 08:46:50 mvs Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -294,7 +294,8 @@ again: pr->ps_flags & PS_PPWAIT) return (EIO); pgsignal(pr->ps_pgrp, SIGTTIN, 1); - error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg); + error = ttysleep_nsec(tp, &nowake, TTIPRI | PCATCH, + ttybg, SEC_TO_NSEC(1)); if (error) return (error); } diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 41f4f4083bc..636f853e729 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kernel.h,v 1.27 2024/08/14 13:54:08 mvs Exp $ */ +/* $OpenBSD: kernel.h,v 1.28 2025/09/25 08:46:50 mvs Exp $ */ /* $NetBSD: kernel.h,v 1.11 1995/03/03 01:24:16 cgd Exp $ */ /*- @@ -55,7 +55,6 @@ extern int ticks; /* # of hardclock ticks */ extern int hz; /* system clock's frequency */ extern int stathz; /* statistics clock's frequency */ extern int profhz; /* profiling clock's frequency */ -extern int lbolt; /* once a second sleep address */ #ifndef HZ #define HZ 100 diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 401fbeaa0aa..835ce857be4 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.h,v 1.44 2024/10/26 00:56:35 jsg Exp $ */ +/* $OpenBSD: tty.h,v 1.45 2025/09/25 08:46:50 mvs Exp $ */ /* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */ /*- @@ -290,6 +290,7 @@ void ttypend(struct tty *tp); int ttyretype(struct tty *tp); int ttyrub(int c, struct tty *tp); int ttysleep(struct tty *tp, void *chan, int pri, char *wmesg); +int ttysleep_nsec(struct tty *, void *, int, char *, uint64_t); int ttywait(struct tty *tp); int ttywflush(struct tty *tp); void ttytstamp(struct tty *tp, int octs, int ncts, int odcd, int ndcd);