21 #ifndef DE265_THREADS_H
22 #define DE265_THREADS_H
46 #if !defined(NOMINMAX)
50 #include "../extra/win32cond.h"
111 virtual std::string
name()
const {
return "noname"; }
115 #define MAX_THREADS 32
void reset(int value=0)
Definition: threads.h:88
void increase_progress(int progress)
void set_progress(int progress)
void wait_for_progress(int progress)
Definition: threads.h:124
std::deque< thread_task * > tasks
Definition: threads.h:128
int ctbx[MAX_THREADS]
Definition: threads.h:135
de265_mutex mutex
Definition: threads.h:138
bool stopped
Definition: threads.h:126
int ctby[MAX_THREADS]
Definition: threads.h:136
de265_cond cond_var
Definition: threads.h:139
int num_threads_working
Definition: threads.h:133
de265_thread thread[MAX_THREADS]
Definition: threads.h:130
int num_threads
Definition: threads.h:131
Definition: threads.h:102
@ Running
Definition: threads.h:107
@ Blocked
Definition: threads.h:107
@ Finished
Definition: threads.h:107
@ Queued
Definition: threads.h:107
enum thread_task::@46 state
virtual std::string name() const
Definition: threads.h:111
thread_task()
Definition: threads.h:104
virtual ~thread_task()
Definition: threads.h:105
de265_error
Definition: de265.h:82
qulonglong value
Definition: itemviewutilities.cpp:592
de265_error start_thread_pool(thread_pool *pool, int num_threads)
void add_task(thread_pool *pool, thread_task *task)
void de265_cond_wait(de265_cond *c, de265_mutex *m)
pthread_mutex_t de265_mutex
Definition: threads.h:42
void de265_mutex_lock(de265_mutex *m)
void de265_mutex_unlock(de265_mutex *m)
void de265_cond_init(de265_cond *c)
pthread_cond_t de265_cond
Definition: threads.h:43
void de265_thread_join(de265_thread t)
void stop_thread_pool(thread_pool *pool)
int de265_thread_create(de265_thread *t, void *(*start_routine)(void *), void *arg)
#define MAX_THREADS
Definition: threads.h:115
void de265_cond_destroy(de265_cond *c)
void de265_thread_destroy(de265_thread *t)
void de265_cond_broadcast(de265_cond *c, de265_mutex *m)
pthread_t de265_thread
Definition: threads.h:41
void de265_mutex_init(de265_mutex *m)
void de265_mutex_destroy(de265_mutex *m)
void de265_cond_signal(de265_cond *c)