Fix crash happening in particle code caused by non-reentrant qsort()
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 12 Aug 2013 14:37:23 +0000 (14:37 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 12 Aug 2013 14:37:23 +0000 (14:37 +0000)
commit6366a8c61132eb034975606ebbc9a7ffcd0b353f
tree48ac4195d9d447d94e30bfc5622e9580cdb948df
parent033d395bede8849198761c190d0d7e93a95e4313
Fix crash happening in particle code caused by non-reentrant qsort()

Particle system code used global variable to sort hair by orig index,
which is not safe for threading at all.

Replaced this with usage of reentrant version of qsort, which is
now implemented in BLI. It was moved from recast navigation code
to BLI, so more areas could use it (if needed).
extern/recastnavigation/recast-capi.cpp
extern/recastnavigation/recast-capi.h
source/blender/blenkernel/intern/navmesh_conversion.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenlib/BLI_sort.h [new file with mode: 0644]
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/sort.c [new file with mode: 0644]