Blender V2.61 - r43446
|
#include <util_thread.h>
Public Member Functions | |
ThreadQueue () | |
void | push (const T &value) |
void | wait_done () |
void | stop () |
void | cancel () |
bool | worker_wait_pop (T &value) |
void | worker_done () |
bool | worker_cancel () |
Public Attributes | |
GSQueue * | queue |
pthread_mutex_t | mutex |
pthread_cond_t | cond |
int | nowait |
Protected Member Functions | |
void | clear () |
Protected Attributes | |
std::queue< T > | queue |
thread_mutex | queue_mutex |
thread_mutex | done_mutex |
thread_condition_variable | queue_cond |
thread_condition_variable | done_cond |
volatile bool | do_stop |
volatile bool | do_cancel |
volatile int | tot |
volatile int | tot_done |
ThreadQueue< T >::ThreadQueue | ( | ) | [inline] |
Definition at line 55 of file util_thread.h.
void ThreadQueue< T >::cancel | ( | ) | [inline] |
Definition at line 94 of file util_thread.h.
Referenced by CPUDevice::task_cancel().
void ThreadQueue< T >::clear | ( | ) | [inline, protected] |
Definition at line 149 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::cancel(), and ThreadQueue< DeviceTask >::stop().
void ThreadQueue< T >::push | ( | const T & | value | ) | [inline] |
Definition at line 66 of file util_thread.h.
Referenced by DeviceTask::split().
void ThreadQueue< T >::stop | ( | void | ) | [inline] |
Definition at line 86 of file util_thread.h.
Referenced by CPUDevice::~CPUDevice().
void ThreadQueue< T >::wait_done | ( | ) | [inline] |
Definition at line 77 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::cancel(), and CPUDevice::task_wait().
bool ThreadQueue< T >::worker_cancel | ( | ) | [inline] |
Definition at line 143 of file util_thread.h.
Referenced by CPUDevice::thread_path_trace(), and CPUDevice::thread_shader().
void ThreadQueue< T >::worker_done | ( | ) | [inline] |
Definition at line 132 of file util_thread.h.
Referenced by CPUDevice::thread_run().
bool ThreadQueue< T >::worker_wait_pop | ( | T & | value | ) | [inline] |
Definition at line 116 of file util_thread.h.
Referenced by CPUDevice::thread_run().
pthread_cond_t ThreadQueue< T >::cond |
Definition at line 532 of file threads.c.
Referenced by BLI_thread_queue_free(), BLI_thread_queue_init(), BLI_thread_queue_nowait(), BLI_thread_queue_pop(), BLI_thread_queue_pop_timeout(), and BLI_thread_queue_push().
volatile bool ThreadQueue< T >::do_cancel [protected] |
Definition at line 170 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::cancel(), ThreadQueue< DeviceTask >::ThreadQueue(), and ThreadQueue< DeviceTask >::worker_cancel().
volatile bool ThreadQueue< T >::do_stop [protected] |
Definition at line 169 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::stop(), ThreadQueue< DeviceTask >::ThreadQueue(), and ThreadQueue< DeviceTask >::worker_wait_pop().
thread_condition_variable ThreadQueue< T >::done_cond [protected] |
Definition at line 168 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::clear(), ThreadQueue< DeviceTask >::wait_done(), and ThreadQueue< DeviceTask >::worker_done().
thread_mutex ThreadQueue< T >::done_mutex [protected] |
Definition at line 166 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::clear(), ThreadQueue< DeviceTask >::wait_done(), and ThreadQueue< DeviceTask >::worker_done().
pthread_mutex_t ThreadQueue< T >::mutex |
Definition at line 531 of file threads.c.
Referenced by BLI_thread_queue_free(), BLI_thread_queue_init(), BLI_thread_queue_nowait(), BLI_thread_queue_pop(), BLI_thread_queue_pop_timeout(), BLI_thread_queue_push(), and BLI_thread_queue_size().
int ThreadQueue< T >::nowait |
Definition at line 533 of file threads.c.
Referenced by BLI_thread_queue_nowait(), BLI_thread_queue_pop(), and BLI_thread_queue_pop_timeout().
GSQueue* ThreadQueue< T >::queue |
Definition at line 530 of file threads.c.
Referenced by BLI_thread_queue_free(), BLI_thread_queue_init(), BLI_thread_queue_pop(), BLI_thread_queue_pop_timeout(), BLI_thread_queue_push(), BLI_thread_queue_size(), ThreadQueue< DeviceTask >::clear(), ThreadQueue< DeviceTask >::push(), and ThreadQueue< DeviceTask >::worker_wait_pop().
std::queue<T> ThreadQueue< T >::queue [protected] |
Definition at line 164 of file util_thread.h.
thread_condition_variable ThreadQueue< T >::queue_cond [protected] |
Definition at line 167 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::push(), ThreadQueue< DeviceTask >::stop(), and ThreadQueue< DeviceTask >::worker_wait_pop().
thread_mutex ThreadQueue< T >::queue_mutex [protected] |
Definition at line 165 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::clear(), ThreadQueue< DeviceTask >::push(), and ThreadQueue< DeviceTask >::worker_wait_pop().
volatile int ThreadQueue< T >::tot [protected] |
Definition at line 171 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::push(), ThreadQueue< DeviceTask >::ThreadQueue(), ThreadQueue< DeviceTask >::wait_done(), and ThreadQueue< DeviceTask >::worker_done().
volatile int ThreadQueue< T >::tot_done [protected] |
Definition at line 171 of file util_thread.h.
Referenced by ThreadQueue< DeviceTask >::clear(), ThreadQueue< DeviceTask >::ThreadQueue(), ThreadQueue< DeviceTask >::wait_done(), and ThreadQueue< DeviceTask >::worker_done().