aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2008-08-20 12:20:22 +0000
committerEd Schouten <ed@FreeBSD.org>2008-08-20 12:20:22 +0000
commit040b1db93008b111d6ea81370ca9b1b7d5cde384 (patch)
treed0dafb9d146a210be9a36f58aeebd2273ad6799e /sys/kern/kern_synch.c
parentc59abcf330588080b8dba57f3f3806b945d9a1b7 (diff)
downloadsrc-040b1db93008b111d6ea81370ca9b1b7d5cde384.tar.gz
src-040b1db93008b111d6ea81370ca9b1b7d5cde384.zip
Remove the now unused `lbolt' variable from the kernel.
We used to have a single wait channel inside the kernel which could be used by threads that just wanted to sleep for some time (the next second). The old TTY layer was the only piece of code that still used lbolt, because I already removed the use of lbolt from the NFS clients and the VFS syncer. Approved by: philip
Notes
Notes: svn path=/head/; revision=181921
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index ef682f488463..9b7804b1bde9 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -70,11 +70,9 @@ SYSINIT(synch_setup, SI_SUB_KICK_SCHEDULER, SI_ORDER_FIRST, synch_setup,
NULL);
int hogticks;
-int lbolt;
static int pause_wchan;
static struct callout loadav_callout;
-static struct callout lbolt_callout;
struct loadavg averunnable =
{ {0, 0, 0}, FSCALE }; /* load average, of runnable procs */
@@ -93,7 +91,6 @@ static int fscale __unused = FSCALE;
SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, 0, FSCALE, "");
static void loadav(void *arg);
-static void lboltcb(void *arg);
void
sleepinit(void)
@@ -136,8 +133,8 @@ _sleep(void *ident, struct lock_object *lock, int priority,
#endif
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, lock,
"Sleeping on \"%s\"", wmesg);
- KASSERT(timo != 0 || mtx_owned(&Giant) || lock != NULL ||
- ident == &lbolt, ("sleeping without a lock"));
+ KASSERT(timo != 0 || mtx_owned(&Giant) || lock != NULL,
+ ("sleeping without a lock"));
KASSERT(p != NULL, ("msleep1"));
KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep"));
if (priority & PDROP)
@@ -202,7 +199,7 @@ _sleep(void *ident, struct lock_object *lock, int priority,
* stopped, then td will no longer be on a sleep queue upon
* return from cursig().
*/
- sleepq_add(ident, ident == &lbolt ? NULL : lock, wmesg, flags, 0);
+ sleepq_add(ident, lock, wmesg, flags, 0);
if (timo)
sleepq_set_timeout(ident, timo);
if (lock != NULL && class->lc_flags & LC_SLEEPABLE) {
@@ -515,23 +512,14 @@ loadav(void *arg)
loadav, NULL);
}
-static void
-lboltcb(void *arg)
-{
- wakeup(&lbolt);
- callout_reset(&lbolt_callout, hz, lboltcb, NULL);
-}
-
/* ARGSUSED */
static void
synch_setup(void *dummy)
{
callout_init(&loadav_callout, CALLOUT_MPSAFE);
- callout_init(&lbolt_callout, CALLOUT_MPSAFE);
/* Kick off timeout driven events by calling first time. */
loadav(NULL);
- lboltcb(NULL);
}
/*