mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 22:47:50 +00:00
lx_emul/x86_32: atomic64 set and cmpxchg
64-Bit versions for 32-Bit architecture. issue #5104
This commit is contained in:
parent
8c26a142c6
commit
1006e9d987
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user