From owner-freebsd-current@FreeBSD.ORG Tue Aug 2 14:17:24 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5B4516A41F; Tue, 2 Aug 2005 14:17:24 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from haven.freebsd.dk (haven.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E71D43D46; Tue, 2 Aug 2005 14:17:24 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (unknown [192.168.48.2]) by haven.freebsd.dk (Postfix) with ESMTP id 2F27DBC66; Tue, 2 Aug 2005 14:17:23 +0000 (UTC) To: Daniel Eischen From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 02 Aug 2005 10:10:14 EDT." Date: Tue, 02 Aug 2005 16:17:22 +0200 Message-ID: <25679.1122992242@phk.freebsd.dk> Sender: phk@phk.freebsd.dk Cc: current@freebsd.org Subject: Re: pthreads: shouldn't nanosleep() be a cancellation point ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2005 14:17:24 -0000 In message , Daniel Eisc hen writes: >Hmm, the same could be said for sleep() in libc also, but we jump >through hoops to allow the thread libraries override sleep() with >their own cancellable version. I think this is in case libc wants >to use sleep(), usleep(), nanosleep() internally and not introduce >cancellation points into functions that shouldn't have them. usleep() calls _nanosleep() but I wonder if it shouldn't be redirected into the thead libraraies like sleep/nanosleep ? -- 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.