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/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 14:38:27 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 14:38:27 +0400
commit018ab045e3b9c20e35b5dc658fe35f3327048bbf (patch)
treee86354ccce7658b6c5041c26f15f2e1b75e23218 /intern
parent9f7961b6b10203733ddda62dac3170d6817ff69b (diff)
Added check for whether thread lock is being removed while thread is using guarded alloc.
-- svn merge -r58788:58789 ^/branches/soc-2013-depsgraph_mt
Diffstat (limited to 'intern')
-rw-r--r--intern/guardedalloc/intern/mallocn.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 06ae2ee864d..520df788055 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -280,6 +280,12 @@ static void mem_lock_thread(void)
static void mem_unlock_thread(void)
{
+#ifdef DEBUG_THREADS
+ if (!pthread_equal(pthread_self(), mainid) && thread_lock_callback == NULL) {
+ assert(!"Thread lock was removed while allocation from thread is in progress");
+ }
+#endif
+
if (thread_unlock_callback)
thread_unlock_callback();
}