lx_emul: fix spinlock header for ARM

Fixes wrong atomic_*(ptr) usage with u32 pointer introduced by
commit "lx_emul: eliminate wrong include pathes". Atomic read or
write is nt needed in our case, we always schedule cooperatively.
This commit is contained in:
Stefan Kalkowski 2022-05-30 11:21:11 +02:00 committed by Christian Helmuth
parent f4dabf08e2
commit d213cfa897

View File

@ -25,7 +25,7 @@
static inline int arch_spin_is_locked(arch_spinlock_t *lock)
{
return (atomic_read(&lock->slock)) ? 1 : 0;
return (lock->slock) ? 1 : 0;
}
@ -35,13 +35,13 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
printk("Error: spinlock contention!");
lx_emul_trace_and_stop(__func__);
}
atomic_set(&lock->slock, 1);
lock->slock = 1;
}
static inline void arch_spin_unlock(arch_spinlock_t *lock)
{
atomic_set(&lock->slock, 0);
lock->slock = 0;
}