Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!227make update of s->maxdepth atomic.
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment