Skip to content

grefcount: Optimise g_atomic_ref_count_inc

Currently, g_atomic_ref_count_inc () does three operations. We try to get this down to one operation.

Fixed by creating another atomic operation which increments and returns old value g_atomic_int_inc_and_return_old () in gatomic

Replace g_atomic_int_inc () with g_atomic_int_inc_and_return_old () Note: changes current behaviour, checks are now done after increment.

Closes: #1583 (closed)

Edited by Sebastian Dröge

Merge request reports