From: Mathieu Desnoyers Date: Sun, 11 Sep 2011 06:45:59 +0000 (-0700) Subject: Pair all_cpu call_rcu create with free X-Git-Tag: v0.6.5~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0938c5415e2a0bf18afc9a225466ddf01e7cbb3d;p=userspace-rcu.git Pair all_cpu call_rcu create with free Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_lfq.c b/tests/test_urcu_lfq.c index 2d701f2..5292ebd 100644 --- a/tests/test_urcu_lfq.c +++ b/tests/test_urcu_lfq.c @@ -450,6 +450,7 @@ int main(int argc, char **argv) tot_successful_enqueues, tot_successful_dequeues + end_dequeues); + free_all_cpu_call_rcu_data(); free(count_enqueuer); free(count_dequeuer); free(tid_enqueuer); diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c index e02fa58..c85fa44 100644 --- a/tests/test_urcu_lfs.c +++ b/tests/test_urcu_lfs.c @@ -446,6 +446,7 @@ int main(int argc, char **argv) tot_successful_enqueues, tot_successful_dequeues + end_dequeues); + free_all_cpu_call_rcu_data(); free(count_enqueuer); free(count_dequeuer); free(tid_enqueuer); diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index 38cc001..c14cc18 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -482,7 +482,9 @@ void set_thread_call_rcu_data(struct call_rcu_data *crdp) /* * Create a separate call_rcu thread for each CPU. This does not * replace a pre-existing call_rcu thread -- use the set_cpu_call_rcu_data() - * function if you want that behavior. + * function if you want that behavior. Should be paired with + * free_all_cpu_call_rcu_data() to teardown these call_rcu worker + * threads. */ int create_all_cpu_call_rcu_data(unsigned long flags)