Date: Mon, 5 Mar 2007 09:36:21 +0000 (GMT) From: Robert Watson <rwatson@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: <20070305092518.F44433@fledge.watson.org> In-Reply-To: <200703042342.l24Ngwmu040217@repoman.freebsd.org> References: <200703042342.l24Ngwmu040217@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 4 Mar 2007, Greg Lehey wrote: > grog 2007-03-04 23:42:58 UTC > > FreeBSD src repository > > Modified files: > share/man/man9 sleep.9 > Log: > Rearrange function descriptions in more logical order. > Be less alarmist about the dangers of abusing wakeup_one(). How would you feel about language along the lines of: Prior to the introduction of wakeup_one(), using a single wait channel address was possible as long as all sleepers looped around the sleep call re-checking the condition after each wakeup. However, with the addition of wakeup_one(), combining wait channels for multiple purposes may lead easily to bugs involving lost wakeups, and is strongly discouraged. It is recommended that consumers of the sleep(9) programming interface carefully follow the convention of using only wait channels associated with memory addresses explicitly allocated for this purpose, and not overload or extend the semantics of existing wait channels without careful analysis in order to avoid potential channel collisions. Programmers may find the cv(9) interface easier to use correctly, as it has explicit condition variable data structures. That way we combine warnings about potential misuse with a recommendation for the cv(9) API. Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070305092518.F44433>