Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-18 08:30:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-18 08:31:12 +0300
commit338ebea53e380d0bfcc49be580c19cc6024d5122 (patch)
tree441d5ac692abd544e5213d79fa5de439c1ecadc7 /source
parente6978f4d63d130b61de7d8f3bdc497750377ae71 (diff)
Cleanup: remove unused global locks from BLI_threads
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/BLI_threads.h29
-rw-r--r--source/blender/blenlib/intern/threads.cc6
2 files changed, 15 insertions, 20 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index a281aaa5b51..d19b5393aa7 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -59,21 +59,22 @@ int BLI_system_thread_count(void); /* gets the number of threads the system can
void BLI_system_num_threads_override_set(int num);
int BLI_system_num_threads_override_get(void);
-/* Global Mutex Locks
+/**
+ * Global Mutex Locks
*
- * One custom lock available now. can be extended. */
-
-#define LOCK_IMAGE 0
-#define LOCK_DRAW_IMAGE 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_COLORMANAGE 8
-#define LOCK_FFTW 9
-#define LOCK_VIEW3D 10
+ * One custom lock available now. can be extended.
+ */
+enum {
+ LOCK_IMAGE = 0,
+ LOCK_DRAW_IMAGE,
+ LOCK_VIEWER,
+ LOCK_CUSTOM1,
+ LOCK_NODES,
+ LOCK_MOVIECLIP,
+ LOCK_COLORMANAGE,
+ LOCK_FFTW,
+ LOCK_VIEW3D,
+};
void BLI_thread_lock(int type);
void BLI_thread_unlock(int type);
diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc
index c206aa8d91f..a2b1a12c783 100644
--- a/source/blender/blenlib/intern/threads.cc
+++ b/source/blender/blenlib/intern/threads.cc
@@ -119,8 +119,6 @@ static pthread_mutex_t _image_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _image_draw_lock = PTHREAD_MUTEX_INITIALIZER;
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 _nodes_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _movieclip_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t _colormanage_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -368,10 +366,6 @@ static ThreadMutex *global_mutex_from_type(const int type)
return &_viewer_lock;
case LOCK_CUSTOM1:
return &_custom1_lock;
- case LOCK_RCACHE:
- return &_rcache_lock;
- case LOCK_OPENGL:
- return &_opengl_lock;
case LOCK_NODES:
return &_nodes_lock;
case LOCK_MOVIECLIP: