diff options
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_threads.h | 1 | ||||
-rw-r--r-- | source/blender/blenlib/intern/threads.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index 902373bcd6b..9cd801f819d 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -77,6 +77,7 @@ int BLI_system_thread_count(void); /* gets the number of threads the system #define LOCK_OPENGL 5 #define LOCK_NODES 6 #define LOCK_MOVIECLIP 7 +#define LOCK_COLORMANAGE 8 void BLI_lock_thread(int type); void BLI_unlock_thread(int type); diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index 9994f89acd5..66527b9b92a 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -113,6 +113,7 @@ static pthread_mutex_t _rcache_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _opengl_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _nodes_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _movieclip_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t _colormanage_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_t mainid; static int thread_levels = 0; /* threads can be invoked inside threads */ @@ -351,6 +352,8 @@ void BLI_lock_thread(int type) pthread_mutex_lock(&_nodes_lock); else if (type == LOCK_MOVIECLIP) pthread_mutex_lock(&_movieclip_lock); + else if (type == LOCK_COLORMANAGE) + pthread_mutex_lock(&_colormanage_lock); } void BLI_unlock_thread(int type) @@ -371,6 +374,8 @@ void BLI_unlock_thread(int type) pthread_mutex_unlock(&_nodes_lock); else if (type == LOCK_MOVIECLIP) pthread_mutex_unlock(&_movieclip_lock); + else if (type == LOCK_COLORMANAGE) + pthread_mutex_unlock(&_colormanage_lock); } /* Mutex Locks */ |