summaryrefslogtreecommitdiff
path: root/libcpu/arm/cortex-a/cpu.c
diff options
context:
space:
mode:
authorshaojinchun <[email protected]>2019-09-26 18:13:07 +0800
committershaojinchun <[email protected]>2019-09-27 14:38:33 +0800
commitcb07e5fb24afebdf233847da551d3ede80727345 (patch)
treee1885e5a8925aefe3df70577416d4b4ddb698b5f /libcpu/arm/cortex-a/cpu.c
parent676279421feba8832f926a2e96b5e7dc7fdb0652 (diff)
开放spinlock相关函数
Diffstat (limited to 'libcpu/arm/cortex-a/cpu.c')
-rw-r--r--libcpu/arm/cortex-a/cpu.c6
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;