File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -524,7 +524,9 @@ find_predecessor(struct critnib_node *__restrict n) {
524
524
while (1 ) {
525
525
int nib ;
526
526
for (nib = NIB ; nib >= 0 ; nib -- ) {
527
- if (n -> child [nib ]) {
527
+ struct critnib_node * m ;
528
+ utils_atomic_load_acquire_ptr ((void * * )& n -> child [nib ], (void * * )& m );
529
+ if (m ) {
528
530
break ;
529
531
}
530
532
}
@@ -533,7 +535,7 @@ find_predecessor(struct critnib_node *__restrict n) {
533
535
return NULL ;
534
536
}
535
537
536
- n = n -> child [nib ];
538
+ utils_atomic_load_acquire_ptr (( void * * ) & n -> child [nib ], ( void * * ) & n ) ;
537
539
if (is_leaf (n )) {
538
540
return to_leaf (n );
539
541
}
@@ -637,7 +639,9 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
637
639
while (1 ) {
638
640
unsigned nib ;
639
641
for (nib = 0 ; nib <= NIB ; nib ++ ) {
640
- if (n -> child [nib ]) {
642
+ struct critnib_node * m ;
643
+ utils_atomic_load_acquire_ptr ((void * * )& n -> child [nib ], (void * * )& m );
644
+ if (m ) {
641
645
break ;
642
646
}
643
647
}
@@ -646,7 +650,7 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
646
650
return NULL ;
647
651
}
648
652
649
- n = n -> child [nib ];
653
+ utils_atomic_load_acquire_ptr (( void * * ) & n -> child [nib ], ( void * * ) & n ) ;
650
654
if (is_leaf (n )) {
651
655
return to_leaf (n );
652
656
}
You can’t perform that action at this time.
0 commit comments