Date: Wed, 30 Jul 2008 19:11:59 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 146257 for review Message-ID: <200807301911.m6UJBxVr009905@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146257 Change 146257 by ed@ed_dull on 2008/07/30 19:11:00 In mpsafetty, we don't make use of lbolt anymore. Remove it in this branch, so I can integrate it during the mpsafetty import. Affected files ... .. //depot/projects/mpsafetty/sys/kern/kern_synch.c#2 edit .. //depot/projects/mpsafetty/sys/sys/kernel.h#3 edit Differences ... ==== //depot/projects/mpsafetty/sys/kern/kern_synch.c#2 (text+ko) ==== @@ -70,11 +70,9 @@ 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 @@ 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 @@ #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 (lock != NULL) @@ -198,7 +195,7 @@ * 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) { @@ -509,23 +506,14 @@ 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); } /* ==== //depot/projects/mpsafetty/sys/sys/kernel.h#3 (text+ko) ==== @@ -69,7 +69,6 @@ extern int profhz; /* profiling clock's frequency */ extern int profprocs; /* number of process's profiling */ extern int ticks; -extern int lbolt; /* once a second sleep address */ #endif /* _KERNEL */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807301911.m6UJBxVr009905>