TMPLEASEFILE, LEASEFILE);
unlink(TMPLEASEFILE);
}
- virAtomicIntSet(&virNWFilterSnoopState.wLeases, 0);
+ g_atomic_int_set(&virNWFilterSnoopState.wLeases, 0);
skip_rename:
virNWFilterSnoopLeaseFileOpen();
size_t numAuths;
testAuthPtr auths;
- /* virAtomic access only */
+ /* g_atomic access only */
volatile int nextDomID;
/* immutable pointer, immutable object after being initialized with
!(ret->pools = virStoragePoolObjListNew()))
goto error;
- virAtomicIntSet(&ret->nextDomID, 1);
+ g_atomic_int_set(&ret->nextDomID, 1);
return ret;
#include "internal.h"
-/**
- * virAtomicIntSet:
- * Sets the value of atomic to newval.
- *
- * This call acts as a full compiler and hardware memory barrier
- * (after the set)
- */
-#define virAtomicIntSet(i, newv) g_atomic_int_set(i, newv)
-
/**
* virAtomicIntInc:
* Increments the value of atomic by 1.
obj->u.s.magic = klass->magic;
obj->klass = klass;
- virAtomicIntSet(&obj->u.s.refs, 1);
+ g_atomic_int_set(&obj->u.s.refs, 1);
PROBE(OBJECT_NEW, "obj=%p classname=%s", obj, obj->klass->name);
if ((ret = virDBusIsServiceEnabled("org.freedesktop.machine1")) < 0) {
if (ret == -2)
- virAtomicIntSet(&virSystemdHasMachinedCachedValue, -2);
+ g_atomic_int_set(&virSystemdHasMachinedCachedValue, -2);
return ret;
}
if ((ret = virDBusIsServiceRegistered("org.freedesktop.systemd1")) == -1)
return ret;
- virAtomicIntSet(&virSystemdHasMachinedCachedValue, ret);
+ g_atomic_int_set(&virSystemdHasMachinedCachedValue, ret);
return ret;
}
ret = virDBusIsServiceEnabled("org.freedesktop.login1");
if (ret < 0) {
if (ret == -2)
- virAtomicIntSet(&virSystemdHasLogindCachedValue, -2);
+ g_atomic_int_set(&virSystemdHasLogindCachedValue, -2);
return ret;
}
if ((ret = virDBusIsServiceRegistered("org.freedesktop.login1")) == -1)
return ret;
- virAtomicIntSet(&virSystemdHasLogindCachedValue, ret);
+ g_atomic_int_set(&virSystemdHasLogindCachedValue, ret);
return ret;
}
VIR_INFO("CreateMachineWithNetwork isn't supported, switching "
"to legacy CreateMachine method for systemd-machined");
virResetError(&error);
- virAtomicIntSet(&hasCreateWithNetwork, 0);
+ g_atomic_int_set(&hasCreateWithNetwork, 0);
/* Could re-structure without Using goto, but this
* avoids another atomic read which would trigger
* another memory barrier */