mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
开放spinlock相关函数
This commit is contained in:
@@ -25,6 +25,11 @@ int rt_hw_cpu_id(void)
|
||||
return read_csr(mhartid);
|
||||
}
|
||||
|
||||
void rt_hw_spin_lock_init(rt_hw_spinlock_t *lock)
|
||||
{
|
||||
((spinlock_t *)lock)->lock = 0;
|
||||
}
|
||||
|
||||
void rt_hw_spin_lock(rt_hw_spinlock_t *lock)
|
||||
{
|
||||
spinlock_lock((spinlock_t *)lock);
|
||||
|
||||
Reference in New Issue
Block a user