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 14:40:34 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-29 14:44:07 +0400
commitdf5631216a923a0ee18552f6abefbff18c414ae5 (patch)
tree0717615e3ec181de526d52baa9cb83cdea903e66 /source/blender/blenlib/BLI_threads.h
parent57e8c5870aa2657db5c2b69f35112a91d95843f1 (diff)
Fix T37980: Multiple font objects sharing an external font gives problems
Solved by adding RW lock to BKE_vfont_to_curve. So now all the threads are allowed to read chars from ghash, but they'll be locked as soon as one thread would need to load more chars from font to the ghash.
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r--source/blender/blenlib/BLI_threads.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index 7a3ee1dd0f4..3ccfcc023da 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -125,6 +125,8 @@ void BLI_spin_end(SpinLock *spin);
#define THREAD_LOCK_READ 1
#define THREAD_LOCK_WRITE 2
+#define BLI_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER
+
typedef pthread_rwlock_t ThreadRWMutex;
void BLI_rw_mutex_init(ThreadRWMutex *mutex);