commit dbd301c60ac5d62db0f2f2142798259fb5e4d329
parent 78bc44268e10aa4fd34f7ba111a994c1030d522e
Author: oblique <psyberbits@gmail.com>
Date: Tue, 9 Apr 2013 09:24:52 +0300
spinlock.h: replace assembly code in spinlock_unlock with C code.
Diffstat:
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/spinlock.h b/include/spinlock.h
@@ -33,12 +33,7 @@ static inline void
spinlock_unlock(spinlock_t *sl)
{
dmb();
- asm volatile (
- "str %1, [%0]"
- :
- : "r" (&sl->lock), "r" (0)
- : "memory"
- );
+ sl->lock = 0;
dsb();
/* signal event */
asm volatile("sev" : : : "memory");