From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 26 15:18:10 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F00A7106564A for ; Fri, 26 Mar 2010 15:18:10 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4CE8FC1A for ; Fri, 26 Mar 2010 15:18:09 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA05206; Fri, 26 Mar 2010 17:18:01 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4BACD029.9070407@icyb.net.ua> Date: Fri, 26 Mar 2010 17:18:01 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: Ed Schouten References: <4BACC791.70502@icyb.net.ua> <20100326151225.GK82220@hoeg.nl> In-Reply-To: <20100326151225.GK82220@hoeg.nl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: periodically save current time to time-of-day hardware X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 15:18:11 -0000 on 26/03/2010 17:12 Ed Schouten said the following: > * Andriy Gapon wrote: >> + timeout(periodic_resettodr, NULL, 1800 * hz); > > By the way, wouldn't it be a little nicer to use callout(9)? I don't know :-) I see that timeout is deprecated and is unsafe in some respects, but using callout adds a bit more code/churn without any obvious benefit. For example, I don't use any fine-grained locking here, nor do I do drain or stop, so all of the good features of callout are not used. But perhaps I am missing something and I really ought to use some of those features somewhere? -- Andriy Gapon