From 512b47c878b1acd524519096470a1fc975051150 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 10 Nov 2020 19:31:09 +0100 Subject: [PATCH] micro-optimization (skip atomic test) --- libs/pbd/pbd/rcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/pbd/pbd/rcu.h b/libs/pbd/pbd/rcu.h index 9a6971873c..68773f3479 100644 --- a/libs/pbd/pbd/rcu.h +++ b/libs/pbd/pbd/rcu.h @@ -72,7 +72,7 @@ public: */ g_atomic_int_inc (&_active_reads); rv = *((boost::shared_ptr*)g_atomic_pointer_get (&x.gptr)); - g_atomic_int_dec_and_test (&_active_reads); + g_atomic_int_add (&_active_reads, -1); return rv; }