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