From: Mathieu Desnoyers Date: Fri, 30 Sep 2011 16:59:33 +0000 (-0400) Subject: rculfhash: break resize loop on destroy X-Git-Tag: v0.7.0~43^2~104 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d2be3620f8040e68c0abdfb6ee9f11cc8b0961bc;p=urcu.git rculfhash: break resize loop on destroy Signed-off-by: Mathieu Desnoyers --- diff --git a/rculfhash.c b/rculfhash.c index 8a9e097..fa2121c 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -1651,6 +1651,9 @@ void _do_cds_lfht_resize(struct cds_lfht *ht) * Resize table, re-do if the target size has changed under us. */ do { + assert(uatomic_read(&ht->in_progress_resize)); + if (CMM_LOAD_SHARED(ht->in_progress_destroy)) + break; ht->t.resize_initiated = 1; old_size = ht->t.size; new_size = CMM_LOAD_SHARED(ht->t.resize_target);