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) {
524524 while (1 ) {
525525 int nib ;
526526 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 ) {
528530 break ;
529531 }
530532 }
@@ -533,7 +535,7 @@ find_predecessor(struct critnib_node *__restrict n) {
533535 return NULL ;
534536 }
535537
536- n = n -> child [nib ];
538+ utils_atomic_load_acquire_ptr (( void * * ) & n -> child [nib ], ( void * * ) & n ) ;
537539 if (is_leaf (n )) {
538540 return to_leaf (n );
539541 }
@@ -637,7 +639,9 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
637639 while (1 ) {
638640 unsigned nib ;
639641 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 ) {
641645 break ;
642646 }
643647 }
@@ -646,7 +650,7 @@ static struct critnib_leaf *find_successor(struct critnib_node *__restrict n) {
646650 return NULL ;
647651 }
648652
649- n = n -> child [nib ];
653+ utils_atomic_load_acquire_ptr (( void * * ) & n -> child [nib ], ( void * * ) & n ) ;
650654 if (is_leaf (n )) {
651655 return to_leaf (n );
652656 }
You can’t perform that action at this time.
0 commit comments