From 3283f54c7a0444b2e51ec79a4da57e7871528f05 Mon Sep 17 00:00:00 2001 From: xqyjlj Date: Wed, 25 Oct 2023 20:31:25 +0800 Subject: 🎈 perf: perf rt_hw_interrupt_disable/enable (#8042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Shell Co-authored-by: Shell --- src/components.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/components.c') 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 @@ -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. -- cgit v1.3.1