Merge with trunk r41625
[blender.git] / source / blender / blenlib / intern / threads.c
index d472f43..38b3fe6 100644 (file)
@@ -114,6 +114,7 @@ static pthread_mutex_t _custom1_lock = PTHREAD_MUTEX_INITIALIZER;
 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_t mainid;
 static int thread_levels= 0;   /* threads can be invoked inside threads */
 
@@ -350,6 +351,8 @@ void BLI_lock_thread(int type)
                pthread_mutex_lock(&_opengl_lock);
        else if (type==LOCK_NODES)
                pthread_mutex_lock(&_nodes_lock);
+       else if (type==LOCK_MOVIECLIP)
+               pthread_mutex_lock(&_movieclip_lock);
 }
 
 void BLI_unlock_thread(int type)
@@ -368,6 +371,8 @@ void BLI_unlock_thread(int type)
                pthread_mutex_unlock(&_opengl_lock);
        else if(type==LOCK_NODES)
                pthread_mutex_unlock(&_nodes_lock);
+       else if(type==LOCK_MOVIECLIP)
+               pthread_mutex_unlock(&_movieclip_lock);
 }
 
 /* Mutex Locks */