diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
commit | 9892736206676c5b7fabc8d1184f9655511ff2dd (patch) | |
tree | 83562ac50c93fe3004959d35c1af4a5b380fdd97 /source/blender/blenlib/BLI_threads.h | |
parent | cffaa42d3a34c6b310c3c87c98e1f8313881e473 (diff) |
code cleanup: header cleanup and remove some duplicate defines.
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r-- | source/blender/blenlib/BLI_threads.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index a4698ab4dd0..b13da9f0dd4 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -35,7 +35,7 @@ #include <pthread.h> /* for tables, button in UI, etc */ -#define BLENDER_MAX_THREADS 64 +#define BLENDER_MAX_THREADS 64 struct ListBase; @@ -44,15 +44,15 @@ struct ListBase; /*this is run once at startup*/ void BLI_threadapi_init(void); -void BLI_init_threads (struct ListBase *threadbase, void *(*do_thread)(void *), int tot); -int BLI_available_threads(struct ListBase *threadbase); -int BLI_available_thread_index(struct ListBase *threadbase); -void BLI_insert_thread (struct ListBase *threadbase, void *callerdata); -void BLI_remove_thread (struct ListBase *threadbase, void *callerdata); -void BLI_remove_thread_index(struct ListBase *threadbase, int index); -void BLI_remove_threads(struct ListBase *threadbase); -void BLI_end_threads (struct ListBase *threadbase); -int BLI_thread_is_main(void); +void BLI_init_threads(struct ListBase *threadbase, void *(*do_thread)(void *), int tot); +int BLI_available_threads(struct ListBase *threadbase); +int BLI_available_thread_index(struct ListBase *threadbase); +void BLI_insert_thread(struct ListBase *threadbase, void *callerdata); +void BLI_remove_thread(struct ListBase *threadbase, void *callerdata); +void BLI_remove_thread_index(struct ListBase *threadbase, int index); +void BLI_remove_threads(struct ListBase *threadbase); +void BLI_end_threads(struct ListBase *threadbase); +int BLI_thread_is_main(void); void BLI_begin_threaded_malloc(void); @@ -60,28 +60,28 @@ void BLI_end_threaded_malloc(void); /* System Information */ -int BLI_system_thread_count(void); /* gets the number of threads the system can make use of */ +int BLI_system_thread_count(void); /* gets the number of threads the system can make use of */ /* Global Mutex Locks * * One custom lock available now. can be extended. */ -#define LOCK_IMAGE 0 -#define LOCK_PREVIEW 1 -#define LOCK_VIEWER 2 -#define LOCK_CUSTOM1 3 -#define LOCK_RCACHE 4 -#define LOCK_OPENGL 5 -#define LOCK_NODES 6 -#define LOCK_MOVIECLIP 7 +#define LOCK_IMAGE 0 +#define LOCK_PREVIEW 1 +#define LOCK_VIEWER 2 +#define LOCK_CUSTOM1 3 +#define LOCK_RCACHE 4 +#define LOCK_OPENGL 5 +#define LOCK_NODES 6 +#define LOCK_MOVIECLIP 7 -void BLI_lock_thread(int type); -void BLI_unlock_thread(int type); +void BLI_lock_thread(int type); +void BLI_unlock_thread(int type); /* Mutex Lock */ typedef pthread_mutex_t ThreadMutex; -#define BLI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER +#define BLI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER void BLI_mutex_init(ThreadMutex *mutex); void BLI_mutex_lock(ThreadMutex *mutex); @@ -90,8 +90,8 @@ void BLI_mutex_end(ThreadMutex *mutex); /* Read/Write Mutex Lock */ -#define THREAD_LOCK_READ 1 -#define THREAD_LOCK_WRITE 2 +#define THREAD_LOCK_READ 1 +#define THREAD_LOCK_WRITE 2 typedef pthread_rwlock_t ThreadRWMutex; |