summaryrefslogtreecommitdiff
path: root/src/components.c
diff options
context:
space:
mode:
authorxqyjlj <[email protected]>2023-10-25 20:31:25 +0800
committerGitHub <[email protected]>2023-10-25 20:31:25 +0800
commit3283f54c7a0444b2e51ec79a4da57e7871528f05 (patch)
treee4bcd748ad2362f16d0dea5c5da62922de466999 /src/components.c
parent91fc52df3635d5dda8285616420f08efa79cea04 (diff)
🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)
Signed-off-by: Shell <[email protected]> Co-authored-by: Shell <[email protected]>
Diffstat (limited to 'src/components.c')
-rw-r--r--src/components.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components.c b/src/components.c
index c9a25c76dc..33d7ec38e6 100644
--- a/src/components.c
+++ b/src/components.c
@@ -15,6 +15,7 @@
* in some IDEs.
* 2015-07-29 Arda.Fu Add support to use RT_USING_USER_MAIN with IAR
* 2018-11-22 Jesven Add secondary cpu boot up
+ * 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable
*/
#include <rthw.h>
@@ -235,7 +236,10 @@ void rt_application_init(void)
*/
int rtthread_startup(void)
{
- rt_hw_interrupt_disable();
+#ifdef RT_USING_SMP
+ rt_hw_spin_lock_init(&_cpus_lock);
+#endif
+ rt_hw_local_irq_disable();
/* board level initialization
* NOTE: please initialize heap inside board initialization.