Re: [libvirt] [PATCH 08/12] util: replace atomic ops impls with g_atomic_int*

2020-01-14 Thread Pavel Hrdina
On Fri, Jan 10, 2020 at 03:41:12PM +, Daniel P. Berrangé wrote: > Libvirt's original atomic ops impls were largely copied > from GLib's code at the time. The only API difference > was that libvirt's virAtomicIntInc() would return a > value, but g_atomic_int_inc was void. We thus use >

[libvirt] [PATCH 08/12] util: replace atomic ops impls with g_atomic_int*

2020-01-10 Thread Daniel P . Berrangé
Libvirt's original atomic ops impls were largely copied from GLib's code at the time. The only API difference was that libvirt's virAtomicIntInc() would return a value, but g_atomic_int_inc was void. We thus use g_atomic_int_add(v, 1) instead, though this means virAtomicIntInc() now returns the