From owner-freebsd-arch Wed Jul 10 13:53:24 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8ADBF37B400; Wed, 10 Jul 2002 13:53:21 -0700 (PDT) Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AD4F43E4A; Wed, 10 Jul 2002 13:53:21 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0451.cvx22-bradley.dialup.earthlink.net ([209.179.199.196] helo=mindspring.com) by swan.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17SOST-00017u-00; Wed, 10 Jul 2002 13:53:10 -0700 Message-ID: <3D2C9E8A.8D7657E7@mindspring.com> Date: Wed, 10 Jul 2002 13:52:26 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Archie Cobbs Cc: John Baldwin , davidx@viasoft.com.cn, freebsd-arch@FreeBSD.org, julian@elischer.org Subject: Re: Timeout and SMP race References: <200207101815.g6AIFDm28655@arch20m.dellroad.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Archie Cobbs wrote: > [ NOTE: I'm moving this discussion to freebsd-arch@freebsd.org ] > > FWIW, here is an API I've used before. This handles all race > conditions and the 'other thread' question. I like this timer API. You need to add a timer_modify_interval (or something similar), so that intervals can be changed without having to destroy and recreate the timer, though, to avoid another potential race condition. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message