Commit 1a7ca9b3 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'space_split_mapper' into 'master'

make update of s->maxdepth atomic.

Fixes #205.

See merge request !227
parents a35e49bb 6922005a
......@@ -1253,7 +1253,9 @@ void space_split_mapper(void *map_data, int num_elements, void *extra_data) {
struct xpart *xparts = c->xparts;
/* Check the depth. */
if (c->depth > s->maxdepth) s->maxdepth = c->depth;
while (c->depth > (maxdepth = s->maxdepth)) {
atomic_cas(&s->maxdepth, maxdepth, c->depth);
}
/* Split or let it be? */
if (count > space_splitsize || gcount > space_splitsize) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment