From df5631216a923a0ee18552f6abefbff18c414ae5 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 29 Dec 2013 16:40:34 +0600 Subject: 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. --- source/blender/blenlib/BLI_threads.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenlib/BLI_threads.h') 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); -- cgit v1.2.3