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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-29 15:07:38 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-29 15:07:38 +0400
commit3b08ee89965230063a95c74d656d88178622b996 (patch)
tree7247599a56db6875fca0cab76e4e44e0f0efd3e8 /source/blender/blenkernel/intern/font.c
parentdf5631216a923a0ee18552f6abefbff18c414ae5 (diff)
Follow up to the previous commit: vfont_get_data is to use the same RW lock
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r--source/blender/blenkernel/intern/font.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 6256c878d8d..16ffd0eea3a 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -64,7 +64,6 @@
#include "BKE_curve.h"
#include "BKE_displist.h"
-static ThreadMutex vfont_mutex = BLI_MUTEX_INITIALIZER;
static ThreadRWMutex vfont_rwlock = BLI_RWLOCK_INITIALIZER;
/* The vfont code */
@@ -150,7 +149,7 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
if (!vfont->data) {
PackedFile *pf;
- BLI_mutex_lock(&vfont_mutex);
+ BLI_rw_mutex_lock(&vfont_rwlock, THREAD_LOCK_WRITE);
if (vfont->data) {
/* Check data again, since it might have been already
@@ -158,7 +157,7 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
* not accurate or threading, just prevents unneeded
* lock if all the data is here for sure).
*/
- BLI_mutex_unlock(&vfont_mutex);
+ BLI_rw_mutex_unlock(&vfont_rwlock);
return vfont->data;
}
@@ -200,7 +199,7 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
}
}
- BLI_mutex_unlock(&vfont_mutex);
+ BLI_rw_mutex_unlock(&vfont_rwlock);
}
return vfont->data;