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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-11-02 21:25:00 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-11-02 21:25:00 +0300
commitd0d523d809e48882c75f10fdef7c6edd6dd888e6 (patch)
treefe1cf6954472c8d8c229b29d0588a7e8bb37cc58
parentd2fbbed4620c7dff4117f07864ca8ce64740cc95 (diff)
Better fix for pthread ID comparison crap on windows.
Suggested by Sergey, thanks!
-rw-r--r--source/blender/blenlib/intern/task.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c
index b37bb4366ea..a5325aa1cc5 100644
--- a/source/blender/blenlib/intern/task.c
+++ b/source/blender/blenlib/intern/task.c
@@ -347,17 +347,15 @@ static TaskPool *task_pool_create_ex(TaskScheduler *scheduler, void *userdata, c
TaskPool *pool = MEM_callocN(sizeof(TaskPool), "TaskPool");
#ifndef NDEBUG
-# ifndef WIN32 /* WIN32 pthread_t seems to ba a struct, no direct comparison available, *sigh* */
/* Assert we do not try to create a background pool from some parent task - those only work OK from main thread. */
if (is_background) {
const pthread_t thread_id = pthread_self();
- int i = scheduler->num_threads;
+ int i = scheduler->num_threads;
while (i--) {
- BLI_assert(scheduler->threads[i] != thread_id);
+ BLI_assert(!pthread_equal(scheduler->threads[i], thread_id));
}
}
-# endif
#endif
pool->scheduler = scheduler;