cvs commit: src/share/man/man9 sleep.9

John Baldwin jhb at freebsd.org
Wed Feb 28 18:01:20 UTC 2007


On Tuesday 27 February 2007 18:09, Greg Lehey wrote:
> grog        2007-02-27 23:09:32 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     share/man/man9       sleep.9 
>   Log:
>   Furhter clarifications:
>   
>   - the issues with wakeup_one are due to address space clashes between
>     unrelated groups of threads.

Not unrelated threads really, but more that the same address is being used for 
two unrelated "events" or "conditions" (hence the name "condition variable").  
You can have "related" threads use the same address for different events, and 
you can have unrelated threads from different processes using the same 
address for the same event (such as for "accept" where wakeup_one can help a 
lot) and have proper operation.  This is really a programmer bug though 
(worthy of EDOOFUS), and we don't often detail programmer bugs in man pages.

I still feel that this text really isn't clear and probably does more harm 
than good by discouraging use of wakeup_one() when in fact wakeup_one() can 
be quite helpful.

-- 
John Baldwin


More information about the cvs-src mailing list