We can't do it with full guarantee anyway because
there is always a possible race between the setting of
state to THREAD_SLEEPING and actual sleeping.
So just remove the not perfect code to avoid misunderstandings.
This reflects what we have done in wake_sleeping_threads() in
the previous patch.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
cout << "Failed to create thread number " << i << endl;
Application::exit_with_failure();
}
-
- // Wait until the thread has finished launching and is gone to sleep
- while (threads[i].state != THREAD_SLEEPING);
}
}