From owner-p4-projects@FreeBSD.ORG Wed Jul 30 19:12:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 469F3106567C; Wed, 30 Jul 2008 19:12:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A6A71065677 for ; Wed, 30 Jul 2008 19:12:00 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D82728FC13 for ; Wed, 30 Jul 2008 19:11:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m6UJBx3H009907 for ; Wed, 30 Jul 2008 19:11:59 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6UJBxVr009905 for perforce@freebsd.org; Wed, 30 Jul 2008 19:11:59 GMT (envelope-from ed@FreeBSD.org) Date: Wed, 30 Jul 2008 19:11:59 GMT Message-Id: <200807301911.m6UJBxVr009905@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ed@FreeBSD.org using -f From: Ed Schouten To: Perforce Change Reviews Cc: Subject: PERFORCE change 146257 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2008 19:12:00 -0000 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 */