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/arm | |
| parent | 676279421feba8832f926a2e96b5e7dc7fdb0652 (diff) | |
开放spinlock相关函数
Diffstat (limited to 'libcpu/arm')
| -rw-r--r-- | libcpu/arm/cortex-a/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcpu/arm/cortex-a/cpu.c b/libcpu/arm/cortex-a/cpu.c index 6b129f89ee..7c6bf58a4b 100644 --- a/libcpu/arm/cortex-a/cpu.c +++ b/libcpu/arm/cortex-a/cpu.c @@ -14,6 +14,7 @@ #include <board.h> #ifdef RT_USING_SMP + int rt_hw_cpu_id(void) { int cpu_id; @@ -25,6 +26,11 @@ int rt_hw_cpu_id(void) return cpu_id; }; +void rt_hw_spin_lock_init(rt_hw_spinlock_t *lock) +{ + lock->slock = 0; +} + void rt_hw_spin_lock(rt_hw_spinlock_t *lock) { unsigned long tmp; |
