19 #define BLENDER_MAX_THREADS 1024
83 #define BLI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
105 #elif defined(__APPLE__)
107 #elif defined(_MSC_VER)
108 typedef volatile unsigned int SpinLock;
120 #define THREAD_LOCK_READ 1
121 #define THREAD_LOCK_WRITE 2
123 #define BLI_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER
179 #if defined(__APPLE__)
180 # define ThreadLocal(type) pthread_key_t
181 # define BLI_thread_local_create(name) pthread_key_create(&name, NULL)
182 # define BLI_thread_local_delete(name) pthread_key_delete(name)
183 # define BLI_thread_local_get(name) pthread_getspecific(name)
184 # define BLI_thread_local_set(name, value) pthread_setspecific(name, value)
187 # define ThreadLocal(type) __declspec(thread) type
189 # define ThreadLocal(type) __thread type
191 # define BLI_thread_local_create(name)
192 # define BLI_thread_local_delete(name)
193 # define BLI_thread_local_get(name) name
194 # define BLI_thread_local_set(name, value) name = value
void BLI_condition_notify_all(ThreadCondition *cond)
bool BLI_mutex_trylock(ThreadMutex *mutex)
void BLI_rw_mutex_end(ThreadRWMutex *mutex)
void BLI_thread_queue_push(ThreadQueue *queue, void *work)
pthread_spinlock_t SpinLock
void BLI_thread_unlock(int type)
void BLI_ticket_mutex_unlock(TicketMutex *ticket)
void BLI_mutex_end(ThreadMutex *mutex)
void BLI_mutex_free(ThreadMutex *mutex)
pthread_rwlock_t ThreadRWMutex
void BLI_thread_lock(int type)
void BLI_threadpool_remove(struct ListBase *threadbase, void *callerdata)
void BLI_threadapi_init(void)
void BLI_condition_wait(ThreadCondition *cond, ThreadMutex *mutex)
void BLI_threadpool_init(struct ListBase *threadbase, void *(*do_thread)(void *), int tot)
void BLI_condition_wait_global_mutex(ThreadCondition *cond, int type)
void * BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms)
void BLI_mutex_init(ThreadMutex *mutex)
void BLI_system_num_threads_override_set(int num)
pthread_cond_t ThreadCondition
void BLI_condition_end(ThreadCondition *cond)
int BLI_system_thread_count(void)
void BLI_thread_queue_free(ThreadQueue *queue)
int BLI_system_num_threads_override_get(void)
void BLI_threadapi_exit(void)
void BLI_threadpool_end(struct ListBase *threadbase)
void BLI_rw_mutex_lock(ThreadRWMutex *mutex, int mode)
void BLI_ticket_mutex_lock(TicketMutex *ticket)
void BLI_condition_notify_one(ThreadCondition *cond)
bool BLI_thread_queue_is_empty(ThreadQueue *queue)
void BLI_ticket_mutex_free(TicketMutex *ticket)
ThreadMutex * BLI_mutex_alloc(void)
int BLI_thread_is_main(void)
void BLI_condition_init(ThreadCondition *cond)
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_thread_queue_nowait(ThreadQueue *queue)
void BLI_thread_queue_wait_finish(ThreadQueue *queue)
void BLI_mutex_unlock(ThreadMutex *mutex)
void BLI_rw_mutex_init(ThreadRWMutex *mutex)
void BLI_threadpool_remove_index(struct ListBase *threadbase, int index)
void BLI_threadpool_clear(struct ListBase *threadbase)
int BLI_available_threads(struct ListBase *threadbase)
ThreadRWMutex * BLI_rw_mutex_alloc(void)
int BLI_threadpool_available_thread_index(struct ListBase *threadbase)
void BLI_spin_init(SpinLock *spin)
void BLI_spin_unlock(SpinLock *spin)
void * BLI_thread_queue_pop(ThreadQueue *queue)
void BLI_spin_lock(SpinLock *spin)
void BLI_rw_mutex_free(ThreadRWMutex *mutex)
void BLI_threadpool_insert(struct ListBase *threadbase, void *callerdata)
ThreadQueue * BLI_thread_queue_init(void)
void BLI_rw_mutex_unlock(ThreadRWMutex *mutex)
pthread_mutex_t ThreadMutex
void BLI_spin_end(SpinLock *spin)
TicketMutex * BLI_ticket_mutex_alloc(void)
int BLI_thread_queue_len(ThreadQueue *queue)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type