16 #ifdef THREAD_SIMPLE_IMPL 24 void ConditionVarSimpleImpl::
26 _mutex.unlock_quietly();
28 ThreadSimpleManager *manager = ThreadSimpleManager::get_global_ptr();
29 ThreadSimpleImpl *thread = manager->get_current_thread();
30 manager->enqueue_block(thread,
this);
31 manager->next_context();
39 void ConditionVarSimpleImpl::
40 wait(
double timeout) {
41 _mutex.unlock_quietly();
47 ThreadSimpleManager *manager = ThreadSimpleManager::get_global_ptr();
48 ThreadSimpleImpl *thread = manager->get_current_thread();
49 manager->enqueue_ready(thread,
true);
50 manager->next_context();
58 void ConditionVarSimpleImpl::
60 ThreadSimpleManager *manager = ThreadSimpleManager::get_global_ptr();
61 if (manager->unblock_one(
this)) {
64 ThreadSimpleImpl *thread = manager->get_current_thread();
65 manager->enqueue_ready(thread,
false);
66 manager->next_context();
73 void ConditionVarSimpleImpl::
75 ThreadSimpleManager *manager = ThreadSimpleManager::get_global_ptr();
76 if (manager->unblock_all(
this)) {
79 ThreadSimpleImpl *thread = manager->get_current_thread();
80 manager->enqueue_ready(thread,
false);
81 manager->next_context();
85 #endif // THREAD_SIMPLE_IMPL PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.