From owner-freebsd-arch@FreeBSD.ORG Thu Jan 3 00:09:52 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78D7916A417; Thu, 3 Jan 2008 00:09:52 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 2B91313C45A; Thu, 3 Jan 2008 00:09:52 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id C0ED417105; Thu, 3 Jan 2008 00:09:50 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m0309oG0002224; Thu, 3 Jan 2008 00:09:50 GMT (envelope-from phk@critter.freebsd.dk) To: Andre Oppermann From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 03 Jan 2008 01:07:21 +0100." <477C2739.5000902@freebsd.org> Date: Thu, 03 Jan 2008 00:09:50 +0000 Message-ID: <2223.1199318990@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Attilio Rao , arch@freebsd.org, Robert Watson , freebsd-arch@freebsd.org Subject: Re: New "timeout" api, to replace callout X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 00:09:52 -0000 In message <477C2739.5000902@freebsd.org>, Andre Oppermann writes: >Poul-Henning Kamp wrote: >> In message <477C1CF3.6070301@freebsd.org>, Andre Oppermann writes: >> >>> I fear we have to go for the latter. Getting a non-sleeping callout >>> drain seems to be non-trivial. >> >> There is a crucial difference between "non-sleeping" and "not sleeping >> on my lock" that you should be very careful about in this context. >> >> Which is your requirement ? > >Calling timeout_drain() must not sleep and not drop the lock in this >context (while making any pending timeout go away forever). Ok, so if the timeouts callback function is running you propose to do what ? spin until it returns ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.