From owner-freebsd-current@FreeBSD.ORG Tue Aug 2 14:20:51 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 1B8CA16A41F for ; Tue, 2 Aug 2005 14:20:51 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7D1743D49 for ; Tue, 2 Aug 2005 14:20:50 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j72EKnOo008400; Tue, 2 Aug 2005 10:20:49 -0400 (EDT) Date: Tue, 2 Aug 2005 10:20:49 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Poul-Henning Kamp In-Reply-To: <25578.1122991617@phk.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) 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 Reply-To: Daniel Eischen 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:20:51 -0000 On Tue, 2 Aug 2005, Poul-Henning Kamp wrote: > 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... I just meant "remove the #includes of namespace.h an un-namespace.h" from libc/gen/usleep.c. -- DE