summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/riscv/include/atomic.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/arch/riscv/include/atomic.h b/src/arch/riscv/include/atomic.h
index 7141d7ba74..df455b9e5b 100644
--- a/src/arch/riscv/include/atomic.h
+++ b/src/arch/riscv/include/atomic.h
@@ -65,33 +65,4 @@ typedef struct { int lock; } spinlock_t;
res; })
#endif
-static inline void spinlock_lock(spinlock_t* lock)
-{
- do
- {
- while (atomic_read(&lock->lock))
- ;
- } while (atomic_swap(&lock->lock, -1));
- mb();
-}
-
-static inline void spinlock_unlock(spinlock_t* lock)
-{
- mb();
- atomic_set(&lock->lock,0);
-}
-
-static inline long spinlock_lock_irqsave(spinlock_t* lock)
-{
- long flags = disable_irqsave();
- spinlock_lock(lock);
- return flags;
-}
-
-static inline void spinlock_unlock_irqrestore(spinlock_t* lock, long flags)
-{
- spinlock_unlock(lock);
- enable_irqrestore(flags);
-}
-
#endif