summaryrefslogtreecommitdiff
path: root/include/rthw.h
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-09-28 11:56:03 +0800
committerBernard Xiong <[email protected]>2019-09-28 11:56:03 +0800
commit5cd65092967a1dbaa35bb7fdd80cf3a0e2f9cc9f (patch)
tree0a749580fd15aa4715a17db1d4b7315f00fcf0a0 /include/rthw.h
parentcb07e5fb24afebdf233847da551d3ede80727345 (diff)
[Kernel] cleanup code of spinlock in SMP Kernel
Diffstat (limited to 'include/rthw.h')
-rw-r--r--include/rthw.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/rthw.h b/include/rthw.h
index a77f2c1e46..2a602dcfe7 100644
--- a/include/rthw.h
+++ b/include/rthw.h
@@ -143,10 +143,10 @@ typedef union {
} tickets;
} rt_hw_spinlock_t;
-typedef struct
+struct rt_spinlock
{
rt_hw_spinlock_t lock;
-} rt_spinlock_t;
+};
void rt_hw_spin_lock_init(rt_hw_spinlock_t *lock);
void rt_hw_spin_lock(rt_hw_spinlock_t *lock);
@@ -187,16 +187,8 @@ void rt_hw_secondary_cpu_idle_exec(void);
#define rt_hw_spin_lock(lock) *(lock) = rt_hw_interrupt_disable()
#define rt_hw_spin_unlock(lock) rt_hw_interrupt_enable(*(lock))
-typedef int rt_spinlock_t;
-
#endif
-void rt_spin_lock_init(rt_spinlock_t *lock);
-void rt_spin_lock(rt_spinlock_t *lock);
-void rt_spin_unlock(rt_spinlock_t *lock);
-rt_base_t rt_spin_lock_irqsave(rt_spinlock_t *lock);
-void rt_spin_unlock_irqrestore(rt_spinlock_t *lock, rt_base_t level);
-
#ifdef __cplusplus
}
#endif