开放spinlock相关函数

This commit is contained in:
shaojinchun
2019-09-27 14:38:33 +08:00
parent 676279421f
commit cb07e5fb24
7 changed files with 148 additions and 3 deletions
+5
View File
@@ -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);