diff options
| author | shaojinchun <[email protected]> | 2019-09-26 18:13:07 +0800 |
|---|---|---|
| committer | shaojinchun <[email protected]> | 2019-09-27 14:38:33 +0800 |
| commit | cb07e5fb24afebdf233847da551d3ede80727345 (patch) | |
| tree | e1885e5a8925aefe3df70577416d4b4ddb698b5f /libcpu/risc-v | |
| parent | 676279421feba8832f926a2e96b5e7dc7fdb0652 (diff) | |
开放spinlock相关函数
Diffstat (limited to 'libcpu/risc-v')
| -rw-r--r-- | libcpu/risc-v/k210/cpuport_smp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcpu/risc-v/k210/cpuport_smp.c b/libcpu/risc-v/k210/cpuport_smp.c index a31314a13f..8c57dfeafc 100644 --- a/libcpu/risc-v/k210/cpuport_smp.c +++ b/libcpu/risc-v/k210/cpuport_smp.c @@ -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); |
