lx_emul/x86_32: atomic64 set and cmpxchg

64-Bit versions for 32-Bit architecture.

issue #5104
This commit is contained in:
Sebastian Sumpf 2024-01-22 18:32:14 +01:00 committed by Christian Helmuth
parent 8c26a142c6
commit 1006e9d987

View File

@ -48,3 +48,17 @@ s64 arch_atomic64_add_return(s64 i, atomic64_t *v)
{
return arch_atomic64_add(i, v);
}
void arch_atomic64_set(atomic64_t *v, s64 i)
{
v->counter = i;
}
s64 arch_atomic64_cmpxchg(atomic64_t *v, s64 o, s64 n)
{
s64 original = v->counter;
if (original == o) v->counter = n;
return original;
}