From owner-cvs-src@FreeBSD.ORG Thu Jul 12 17:00:52 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D195B16A41F; Thu, 12 Jul 2007 17:00:52 +0000 (UTC) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id C347E13C48A; Thu, 12 Jul 2007 17:00:52 +0000 (UTC) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l6CH0qOm074355; Thu, 12 Jul 2007 17:00:52 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l6CH0q6Q074353; Thu, 12 Jul 2007 17:00:52 GMT (envelope-from njl) Message-Id: <200707121700.l6CH0q6Q074353@repoman.freebsd.org> From: Nate Lawson Date: Thu, 12 Jul 2007 17:00:52 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/contrib/altq/altq altq_subr.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2007 17:00:52 -0000 njl 2007-07-12 17:00:52 UTC FreeBSD src repository Modified files: sys/contrib/altq/altq altq_subr.c Log: Fix a bug where the callout might not be initialized before being used. Rev 1.9 introduced another path where machclk_freq would be initialized before the rest of setup was done (i.e. initializing the callout). Make the one-time initialization a separate function and make init_machclk() able to be called multiple times, any time. We depend on tsc_freq first being updated from the highest priority eventhandler, thus we run last and call init_machclk() to set machclk_freq. Also, don't initialize static variables to 0. Tested by: Eygene Ryabinkin Approved by: re Revision Changes Path 1.10 +18 -6 src/sys/contrib/altq/altq/altq_subr.c