Date: Wed, 16 Aug 2000 12:27:56 +1000 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: David Greenman <dg@root.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Ugly, slow shutdown Message-ID: <00Aug16.122802est.115238@border.alcanet.com.au> In-Reply-To: <200008072149.OAA04253@implode.root.com>; from dg@root.com on Mon, Aug 07, 2000 at 02:49:34PM -0700 References: <398F3089.416DEA1@originative.co.uk> <200008072149.OAA04253@implode.root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-Aug-07 14:49:34 -0700, David Greenman <dg@root.com> wrote: > No, that's not true, and there are many examples in the kernel where a >bogus wakeup would lead to bad things happening. I recall some code in the >advisory locking code, and VM system, that assume that there is only one >wakeup event and that the thing causing it assures that certain other >things have occured before issuing it. That's just the way it has worked >since the dawn of time. In the beginning, there was sleep(). The V6, V7, 2.9BSD and 2.11BSD [which is all I've checked] sources all include the following comment on sleep(): * Callers of this routine must be prepared for * premature return, and check that the reason for * sleeping has gone away. 2.9BSD tsleep() is implemented using sleep() and it's not immediately obvious that tsleep() won't also return prematurely. In 2.11BSD, sleep() is implemented using a tsleep() `"borrowed" from 4.4BSD'. Presumably a conscious decision was made to change the semantics between sleep() and tsleep(). Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00Aug16.122802est.115238>