for risc-v, add __spin_lock and __spin_unlock
authorAndrew Waterman <waterman@eecs.berkeley.edu>
Sat, 15 Dec 2012 00:35:14 +0000 (16:35 -0800)
committerAndrew Waterman <waterman@eecs.berkeley.edu>
Sat, 15 Dec 2012 03:36:37 +0000 (19:36 -0800)
kern/arch/riscv/atomic.h

index ba0f2d0..0d35bc8 100644 (file)
@@ -112,7 +112,7 @@ static inline uint32_t spin_trylock(spinlock_t* lock)
        return __sync_fetch_and_or(&lock->rlock, 1);
 }
 
-static inline void spin_lock(spinlock_t *lock)
+static inline void __spin_lock(spinlock_t *lock)
 {
        do
        {
@@ -122,7 +122,7 @@ static inline void spin_lock(spinlock_t *lock)
        mb();
 }
 
-static inline void spin_unlock(spinlock_t *lock)
+static inline void __spin_unlock(spinlock_t *lock)
 {
        mb();
        lock->rlock = 0;