Revision: 58789
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58789
Author:   nazgul
Date:     2013-07-31 21:55:41 +0000 (Wed, 31 Jul 2013)
Log Message:
-----------
Added check for whether thread lock is being removed while thread is using 
guarded alloc.

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn.c

Modified: branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn.c
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn.c 
2013-07-31 21:55:36 UTC (rev 58788)
+++ branches/soc-2013-depsgraph_mt/intern/guardedalloc/intern/mallocn.c 
2013-07-31 21:55:41 UTC (rev 58789)
@@ -280,6 +280,12 @@
 
 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();
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to