From owner-freebsd-arch@FreeBSD.ORG Wed Nov 29 19:45:50 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F6A616A407; Wed, 29 Nov 2006 19:45:50 +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 C18B543CA3; Wed, 29 Nov 2006 19:45:46 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 7F996170C5; Wed, 29 Nov 2006 19:45:48 +0000 (UTC) To: John Baldwin From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 29 Nov 2006 13:46:00 EST." <200611291346.01246.jhb@freebsd.org> Date: Wed, 29 Nov 2006 19:45:46 +0000 Message-ID: <10814.1164829546@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Robert Watson , freebsd-arch@freebsd.org Subject: Re: a proposed callout API 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: Wed, 29 Nov 2006 19:45:50 -0000 In message <200611291346.01246.jhb@freebsd.org>, John Baldwin writes: >Different APIs would be fine. IIRC, that's how Darwin does it. With the >tick_t idea, you could easily have: > >tick_t relative_wakeup(ulong nsec) >tick_t absolute_wakeup(struct timeval *tv) (or something else, etc.) I really do not want to encode the rel/abs aspect in the tick_t. I want it marked up directly in the flags passed which kind of behaviour the code wants. >walltime timeouts (such as for TCP as Poul-Henning mentioned). I like tick_t, >I just want to make sure we change foosleep() to use it as well, and wanted to >raise the idea of relative vs absolute deadlines. Agreed, foosleep() should take tick_t as well. I propose you and I write up the new API in detail and then present that document here on arch@ at a latter date. Is that OK with you ? -- 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.