We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96d2ef3 commit 44e4981Copy full SHA for 44e4981
src/critnib/critnib.c
@@ -645,7 +645,9 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
645
while (1) {
646
unsigned nib;
647
for (nib = 0; nib <= NIB; nib++) {
648
- if (n->child[nib]) {
+ struct critnib_node *m;
649
+ utils_atomic_load_acquire_ptr((void **)&n->child[nib], (void **)&m);
650
+ if (m) {
651
break;
652
}
653
@@ -654,7 +656,7 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
654
656
return NULL;
655
657
658
- n = n->child[nib];
659
+ utils_atomic_load_acquire_ptr((void **)&n->child[nib], (void **)&n);
660
661
if (!n) {
662
0 commit comments