From owner-freebsd-current@FreeBSD.ORG Tue Aug 2 14:06:59 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 B6D2B16A41F; Tue, 2 Aug 2005 14:06:59 +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 5E34543D48; Tue, 2 Aug 2005 14:06:59 +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 8F3CABC69; Tue, 2 Aug 2005 14:06:57 +0000 (UTC) To: Daniel Eischen From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 02 Aug 2005 10:02:36 EDT." Date: Tue, 02 Aug 2005 16:06:57 +0200 Message-ID: <25578.1122991617@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:06:59 -0000 In message , Daniel Eisc hen writes: >On Tue, 2 Aug 2005, Poul-Henning Kamp wrote: >> >> Since sleep() is a cancellation point, shouldn't nanosleep() be as well ? > >nanosleep() is a cancellation point. At least, that's the way it's >coded and should work. Note that _nanosleep() isn't. By design, if >libc is using _nanosleep() in places, then that wouldn't cause a >cancellation point. > >> (this would also cover usleep()) > >Hmm, is your real complaint that usleep() is not a cancellation point? >usleep() should be a cancellation point, so you can fix it if you >want (s/_nano/nano/ and remove the namespace stuff). Right I was surprised that usleep() wasn't a cancellation point, I'm not sure I have a drivers license good for the namespace stuff... -- 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.