Date: Wed, 28 Feb 2007 09:54:52 -0500 From: John Baldwin <jhb@freebsd.org> To: Greg Lehey <grog@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/share/man/man9 sleep.9 Message-ID: <200702280954.54068.jhb@freebsd.org> In-Reply-To: <200702272309.l1RN9Xum011236@repoman.freebsd.org> References: <200702272309.l1RN9Xum011236@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702280954.54068.jhb>