13
0

micro-optimization (skip atomic test)

This commit is contained in:
Robin Gareus 2020-11-10 19:31:09 +01:00
parent 01cdaa49b4
commit 512b47c878
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -72,7 +72,7 @@ public:
*/
g_atomic_int_inc (&_active_reads);
rv = *((boost::shared_ptr<T>*)g_atomic_pointer_get (&x.gptr));
g_atomic_int_dec_and_test (&_active_reads);
g_atomic_int_add (&_active_reads, -1);
return rv;
}