From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: Charles Forsyth Date: Wed, 28 Oct 2009 09:43:28 +0000 To: 9fans@9fans.net In-Reply-To: <8c9a75f61b57905d955240c33d4d805c@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] double wakeup disallowed Topicbox-Message-UUID: 92b42a6a-ead5-11e9-9d60-3106f5b1d025 it isn't protecting against double wakeups, but instead detects a bug in the code. there's an invariant that the rendez and the process point to each other while the process is asleep. wakeup checks that invariant. there are three primitives (sleep, wakeup and note) and at different times in the past at least one of them has been wrong; it's wise to check the invariant. >and only disallows waking up a process that's not >sleeping or sleeping on another Rendez. but wakeup doesn't wakeup a particular process, it wakes up exactly the process sleeping on the given Rendez, so the situation can't arise.