X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Frculfhash.c;h=a453326a4124f11ac06aeb14697214d99b3c020d;hb=dad4e6b76774924762a4eb56def7fbaee38d7653;hp=307ba7d1d847175da6d7fa5aef592ab54919f5bf;hpb=601922a81d884e16ff404cee7534ede56fb87d0a;p=userspace-rcu.git diff --git a/src/rculfhash.c b/src/rculfhash.c index 307ba7d..a453326 100644 --- a/src/rculfhash.c +++ b/src/rculfhash.c @@ -259,7 +259,6 @@ #include #include #include -#include #include #include #include @@ -1154,7 +1153,7 @@ int _cds_lfht_del(struct cds_lfht *ht, unsigned long size, struct cds_lfht_node *node) { struct cds_lfht_node *bucket, *next; - struct cds_lfht_node **node_next; + uintptr_t *node_next; if (!node) /* Return -ENOENT if asked to delete NULL node */ return -ENOENT; @@ -1186,7 +1185,7 @@ int _cds_lfht_del(struct cds_lfht *ht, unsigned long size, * NOTE: The node_next variable is present to avoid breaking * strict-aliasing rules. */ - node_next = &node->next; + node_next = (uintptr_t*)&node->next; uatomic_or_mo(node_next, REMOVED_FLAG, CMM_RELEASE); /* We performed the (logical) deletion. */ @@ -1427,7 +1426,7 @@ void remove_table_partition(struct cds_lfht *ht, unsigned long i, for (j = size + start; j < size + start + len; j++) { struct cds_lfht_node *fini_bucket = bucket_at(ht, j); struct cds_lfht_node *parent_bucket = bucket_at(ht, j - size); - struct cds_lfht_node **fini_bucket_next; + uintptr_t *fini_bucket_next; urcu_posix_assert(j >= size && j < (size << 1)); dbg_printf("remove entry: order %lu index %lu hash %lu\n", @@ -1437,7 +1436,7 @@ void remove_table_partition(struct cds_lfht *ht, unsigned long i, * NOTE: The fini_bucket_next variable is present to * avoid breaking strict-aliasing rules. */ - fini_bucket_next = &fini_bucket->next; + fini_bucket_next = (uintptr_t*)&fini_bucket->next; uatomic_or(fini_bucket_next, REMOVED_FLAG); _cds_lfht_gc_bucket(parent_bucket, fini_bucket); }