Commit fbb064de authored by Mark Charlebois's avatar Mark Charlebois Committed by Behan Webster
Browse files

spinlock

I have no idea if this is correct. Clang would complain about the "I"
constraint being invalid and then crash. This workaround just lets me
move on to fix the next bug for now.
parent 64836e7f
......@@ -58,7 +58,7 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
/* We got the lock. Critical section starts here. */
"3:"
: "=&r" (lockval), "=&r" (newval), "=&r" (tmp), "+Q" (*lock)
: "Q" (lock->owner), "I" (1 << TICKET_SHIFT)
: "Q" (lock->owner), "r" (1 << TICKET_SHIFT)
: "memory");
}
......@@ -77,7 +77,7 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
" cbnz %w1, 1b\n"
"2:"
: "=&r" (lockval), "=&r" (tmp), "+Q" (*lock)
: "I" (1 << TICKET_SHIFT)
: "r" (1 << TICKET_SHIFT)
: "memory");
return !tmp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment