X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Frculfhash-mm-chunk.c;h=76ec1bbd2d4c6e5660fe0087d1b7d3e824e1017b;hb=4b3a7ebd5597b5e241c39110eb426f7832066308;hp=a7a9b765b4c2c734389b869fc8c4f0ceb7e46281;hpb=6893800a4d1cc14dff0395ddcd660a5138db183d;p=userspace-rcu.git diff --git a/src/rculfhash-mm-chunk.c b/src/rculfhash-mm-chunk.c index a7a9b76..76ec1bb 100644 --- a/src/rculfhash-mm-chunk.c +++ b/src/rculfhash-mm-chunk.c @@ -21,7 +21,8 @@ */ #include -#include +#include +#include "rculfhash-internal.h" static void cds_lfht_alloc_bucket_table(struct cds_lfht *ht, unsigned long order) @@ -29,14 +30,14 @@ void cds_lfht_alloc_bucket_table(struct cds_lfht *ht, unsigned long order) if (order == 0) { ht->tbl_chunk[0] = calloc(ht->min_nr_alloc_buckets, sizeof(struct cds_lfht_node)); - assert(ht->tbl_chunk[0]); + urcu_posix_assert(ht->tbl_chunk[0]); } else if (order > ht->min_alloc_buckets_order) { unsigned long i, len = 1UL << (order - 1 - ht->min_alloc_buckets_order); for (i = len; i < 2 * len; i++) { ht->tbl_chunk[i] = calloc(ht->min_nr_alloc_buckets, sizeof(struct cds_lfht_node)); - assert(ht->tbl_chunk[i]); + urcu_posix_assert(ht->tbl_chunk[i]); } } /* Nothing to do for 0 < order && order <= ht->min_alloc_buckets_order */