pthreads: shouldn't nanosleep() be a cancellation point ?

Poul-Henning Kamp phk at
Tue Aug 2 14:17:24 GMT 2005

In message <Pine.GSO.4.43.0508021007350.5408-100000 at>, 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 at 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.

More information about the freebsd-current mailing list