From mboxrd@z Thu Jan 1 00:00:00 1970 From: presotto@plan9.bell-labs.com Message-Id: <200007201709.NAA13687@cse.psu.edu> Date: Thu, 20 Jul 2000 13:09:30 -0400 To: 9fans@cse.psu.edu Subject: Re: [9fans] Kernel question: i386 test-and-set problem MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: e7f53b70-eac8-11e9-9e20-41e7f4b1d025 r->p is either 0 or a valid process number. Therefore, the r->p access shouldn't cause a crash. We later check the p->r against r under lock to make sure the process is still waiting on that rendezvouz. The worst the unlocked access should do is miss a sleep which was in the process of happening. That would have happened even with the lock with a small delta in timing. In v2 the lock was providing the coherence() that we put herein v3. However, v2 also had deadlock problems twixt sleep and postnote that v3 fixes.