From 54a549d808df0d723d0a5d8d0e3594fd6ee49084 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 5 Jun 2023 15:58:21 +0200 Subject: [PATCH] lx_emul: move arch_atomic64_add_return to dde_linux --- .../dde_linux/src/lib/lx_emul/spec/x86_32/atomic64_32.c | 6 ++++++ repos/dde_linux/src/lib/wifi/lx_emul.c | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/repos/dde_linux/src/lib/lx_emul/spec/x86_32/atomic64_32.c b/repos/dde_linux/src/lib/lx_emul/spec/x86_32/atomic64_32.c index 79181d2ebe..7c670339a5 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/x86_32/atomic64_32.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/x86_32/atomic64_32.c @@ -42,3 +42,9 @@ s64 arch_atomic64_inc_return(atomic64_t *v) { return arch_atomic64_add(1, v); } + + +s64 arch_atomic64_add_return(s64 i, atomic64_t *v) +{ + return arch_atomic64_add(i, v); +} diff --git a/repos/dde_linux/src/lib/wifi/lx_emul.c b/repos/dde_linux/src/lib/wifi/lx_emul.c index 964a881704..6f1df95bcf 100644 --- a/repos/dde_linux/src/lib/wifi/lx_emul.c +++ b/repos/dde_linux/src/lib/wifi/lx_emul.c @@ -533,15 +533,6 @@ void rfkill_init(void) } -#ifdef CONFIG_X86_32 -s64 arch_atomic64_add_return(s64 i, atomic64_t *v) -{ - v->counter += i; - return v->counter; -} -#endif - - void kvfree_call_rcu(struct rcu_head * head,rcu_callback_t func) { void *ptr = (void *) head - (unsigned long) func;