From: Mathieu Desnoyers Date: Wed, 21 Sep 2011 12:44:49 +0000 (-0400) Subject: rculfhash cleanup: count percpu deletes in the positive range X-Git-Tag: v0.7.0~43^2~134 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=80d90c06106dbf17f80c0db4d001e8bb8e6918d9;p=urcu.git rculfhash cleanup: count percpu deletes in the positive range Signed-off-by: Mathieu Desnoyers --- diff --git a/rculfhash.c b/rculfhash.c index 1487980..6045f59 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -583,7 +583,7 @@ void ht_count_del(struct cds_lfht *ht, unsigned long size) cpu = ht_get_cpu(); if (unlikely(cpu < 0)) return; - percpu_count = uatomic_add_return(&ht->percpu_count[cpu].del, -1); + percpu_count = uatomic_add_return(&ht->percpu_count[cpu].del, 1); if (unlikely(!(percpu_count & ((1UL << COUNT_COMMIT_ORDER) - 1)))) { unsigned long count;