avoid busy wait when entering "exclusive" state

This commit is contained in:
Joel Dice 2009-11-29 16:53:05 -07:00
parent 6d9e1270ca
commit 0b09c6aa30

View File

@ -2350,6 +2350,7 @@ enter(Thread* t, Thread::State s)
while (t->m->exclusive) {
// another thread got here first.
ENTER(t, Thread::IdleState);
t->m->stateLock->wait(t->systemThread, 0);
}
switch (t->state) {