9fans archive / 2000 / 07 / 521 / prev next From: presotto@pla... Subject: Re: [9fans] Kernel question: i386 test-and-set problem Date: Thu, 20 Jul 2000 13:09:30 -0400 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.