diff options
| author | wangqinglin <[email protected]> | 2023-06-05 16:43:31 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2023-06-11 07:08:53 +0800 |
| commit | 0c29bed30f81f79f3265813b186d1091e4411dc4 (patch) | |
| tree | d043e5881e8e6ff1f57a62668690459e97ba8eaa /include | |
| parent | 09ea44a37017f02ddf3e5b4a4ad765fbf5fd7954 (diff) | |
内核Kconfig增加AMP选项, api:rt_hw_cpu_id和 RT_USING_SMP宏解耦,增加rt_hw_ipi_send对RT_USING_AMP的依赖
Diffstat (limited to 'include')
| -rw-r--r-- | include/rthw.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/rthw.h b/include/rthw.h index 0fe01f3073..21b28072ce 100644 --- a/include/rthw.h +++ b/include/rthw.h @@ -160,6 +160,15 @@ void rt_hw_exception_install(rt_err_t (*exception_handle)(void *context)); */ void rt_hw_us_delay(rt_uint32_t us); +int rt_hw_cpu_id(void); + +#if defined(RT_USING_SMP) || defined(RT_USING_AMP) +/** + * ipi function + */ +void rt_hw_ipi_send(int ipi_vector, unsigned int cpu_mask); +#endif + #ifdef RT_USING_SMP #include <cpuport.h> /* for spinlock from arch */ @@ -172,8 +181,6 @@ void rt_hw_spin_lock_init(rt_hw_spinlock_t *lock); void rt_hw_spin_lock(rt_hw_spinlock_t *lock); void rt_hw_spin_unlock(rt_hw_spinlock_t *lock); -int rt_hw_cpu_id(void); - extern rt_hw_spinlock_t _cpus_lock; extern rt_hw_spinlock_t _rt_critical_lock; @@ -186,11 +193,6 @@ extern rt_hw_spinlock_t _rt_critical_lock; #define RT_DECLARE_SPINLOCK(x) /** - * ipi function - */ -void rt_hw_ipi_send(int ipi_vector, unsigned int cpu_mask); - -/** * boot secondary cpu */ void rt_hw_secondary_cpu_up(void); |
