Add the usleep back in

MM convinced me.
unstable
James Lee 2012-02-28 20:50:42 -07:00
parent 278f394552
commit 4a5d7debd5
1 changed files with 4 additions and 0 deletions

View File

@ -243,6 +243,10 @@ scheduler_run(THREAD *thread)
// &scheduler_cond, LIST_EMPTY(&WEHead), polltable == NULL); // &scheduler_cond, LIST_EMPTY(&WEHead), polltable == NULL);
pthread_cond_wait(&scheduler_cond, &scheduler_mutex); pthread_cond_wait(&scheduler_cond, &scheduler_mutex);
// pthread_cond_wait still chews CPU in some cases, usleep to yield
// processor so we don't just spin.
usleep(1000);
} }
LIST_FOREACH(current, &WEHead, link) { LIST_FOREACH(current, &WEHead, link) {