diff options
| author | Shell <[email protected]> | 2024-04-19 10:45:09 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-04-19 21:30:12 -0400 |
| commit | 451ac0396512d9fbf2ccad48e08774b8da3cb5ac (patch) | |
| tree | 7b868b9b060ad71998444e77a7a73cc8547c1d92 /include/rtthread.h | |
| parent | 2aacba2c868176e50ccd522e882ca0b194a9ed14 (diff) | |
add cpu up
Diffstat (limited to 'include/rtthread.h')
| -rw-r--r-- | include/rtthread.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/include/rtthread.h b/include/rtthread.h index 2329824112..c8993dd7e6 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -604,45 +604,12 @@ rt_thread_t rt_thread_defunct_dequeue(void); * spinlock */ struct rt_spinlock; -#ifdef RT_USING_SMP void rt_spin_lock_init(struct rt_spinlock *lock); void rt_spin_lock(struct rt_spinlock *lock); void rt_spin_unlock(struct rt_spinlock *lock); rt_base_t rt_spin_lock_irqsave(struct rt_spinlock *lock); void rt_spin_unlock_irqrestore(struct rt_spinlock *lock, rt_base_t level); -#else - -rt_inline void rt_spin_lock_init(struct rt_spinlock *lock) -{ - RT_UNUSED(lock); -} -rt_inline void rt_spin_lock(struct rt_spinlock *lock) -{ - RT_UNUSED(lock); - rt_enter_critical(); -} -rt_inline void rt_spin_unlock(struct rt_spinlock *lock) -{ - RT_UNUSED(lock); - rt_exit_critical(); -} -rt_inline rt_base_t rt_spin_lock_irqsave(struct rt_spinlock *lock) -{ - rt_base_t level; - RT_UNUSED(lock); - level = rt_hw_interrupt_disable(); - rt_enter_critical(); - return level; -} -rt_inline void rt_spin_unlock_irqrestore(struct rt_spinlock *lock, rt_base_t level) -{ - RT_UNUSED(lock); - rt_exit_critical(); - rt_hw_interrupt_enable(level); -} - -#endif /* RT_USING_SMP */ /**@}*/ |
