Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Aug 2005 16:06:57 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: pthreads: shouldn't nanosleep() be a cancellation point ? 
Message-ID:  <25578.1122991617@phk.freebsd.dk>
In-Reply-To: Your message of "Tue, 02 Aug 2005 10:02:36 EDT." <Pine.GSO.4.43.0508020954480.5408-100000@sea.ntplx.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.GSO.4.43.0508020954480.5408-100000@sea.ntplx.net>, 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25578.1122991617>