svn merge ^/trunk/blender -r40405:40431
[blender.git] / source / blender / blenlib / intern / threads.c
index f9cd675dd8c654dae335f8f9c496b48e1dcafb94..7604c2b8b0e3e4ce584813bd2f56c87e7d7e04ce 100644 (file)
@@ -114,6 +114,7 @@ static pthread_mutex_t _viewer_lock = PTHREAD_MUTEX_INITIALIZER;
 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 _scanfill_lock = PTHREAD_MUTEX_INITIALIZER;
 static pthread_t mainid;
 static int thread_levels= 0;   /* threads can be invoked inside threads */
 
@@ -347,6 +348,8 @@ void BLI_lock_thread(int type)
                pthread_mutex_lock(&_rcache_lock);
        else if (type==LOCK_OPENGL)
                pthread_mutex_lock(&_opengl_lock);
+       else if (type == LOCK_SCANFILL) 
+               pthread_mutex_lock(&_scanfill_lock);
 }
 
 void BLI_unlock_thread(int type)
@@ -363,6 +366,8 @@ void BLI_unlock_thread(int type)
                pthread_mutex_unlock(&_rcache_lock);
        else if(type==LOCK_OPENGL)
                pthread_mutex_unlock(&_opengl_lock);
+       else if(type == LOCK_SCANFILL)
+               pthread_mutex_unlock(&_scanfill_lock);
 }
 
 /* Mutex Locks */