Skip to content

Commit 10659a8

Browse files
hujun260xiaoxiang781216
authored andcommitted
irq: irq_attach_wqueue replace irq_attach_thread
reason: using a shared same priority queue can reduce memory consumption. Signed-off-by: hujun5 <[email protected]>
1 parent 4c85805 commit 10659a8

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

arch/arm/src/armv7-m/Kconfig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,20 @@ config ARMV7M_SYSTICK
153153
---help---
154154
Enable SysTick timer driver.
155155

156-
config ARMV7M_SYSTICK_IRQ_THREAD
157-
bool "attach irq by irq_attach_thread"
156+
config ARMV7M_SYSTICK_IRQ_WQUEUE
157+
bool "attach irq by irq_attach_wqueue"
158158
default n
159159
depends on ARMV7M_SYSTICK
160160

161-
if ARMV7M_SYSTICK_IRQ_THREAD
161+
if ARMV7M_SYSTICK_IRQ_WQUEUE
162162

163-
config ARMV7M_SYSTICK_IRQ_THREAD_PRIORITY
164-
int "SYSTICK IRQ THREAD PRIORITY"
163+
config ARMV7M_SYSTICK_IRQ_WQUEUE_PRIORITY
164+
int "SYSTICK IRQ WQUEUE PRIORITY"
165165
default 255
166166
range 0 255
167167

168168
config ARMV7M_SYSTICK_IRQ_THREAD_STACK_SIZE
169169
int "SYSTICK IRQ THREAD STACK SIZE"
170170
default DEFAULT_TASK_STACKSIZE
171171

172-
endif # ARMV7M_SYSTICK_IRQ_THREAD
172+
endif # ARMV7M_SYSTICK_IRQ_WQUEUE

arch/arm/src/armv7-m/arm_systick.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int systick_interrupt(int irq, void *context, void *arg)
259259
return 0;
260260
}
261261

262-
#ifdef CONFIG_ARMV7M_SYSTICK_IRQ_THREAD
262+
#ifdef CONFIG_ARMV7M_SYSTICK_IRQ_WQUEUE
263263
static int systick_isr_handle(int irq, void *regs, void *arg)
264264
{
265265
return IRQ_WAKE_THREAD;
@@ -301,11 +301,10 @@ struct timer_lowerhalf_s *systick_initialize(bool coreclk,
301301
putreg32(NVIC_SYSTICK_CTRL_TICKINT, NVIC_SYSTICK_CTRL);
302302
}
303303

304-
#ifdef CONFIG_ARMV7M_SYSTICK_IRQ_THREAD
305-
irq_attach_thread(NVIC_IRQ_SYSTICK, systick_isr_handle,
304+
#ifdef CONFIG_ARMV7M_SYSTICK_IRQ_WQUEUE
305+
irq_attach_wqueue(NVIC_IRQ_SYSTICK, systick_isr_handle,
306306
systick_interrupt, lower,
307-
CONFIG_ARMV7M_SYSTICK_IRQ_THREAD_PRIORITY,
308-
CONFIG_ARMV7M_SYSTICK_IRQ_THREAD_STACK_SIZE);
307+
CONFIG_ARMV7M_SYSTICK_IRQ_WQUEUE_PRIORITY);
309308
#else
310309
irq_attach(NVIC_IRQ_SYSTICK, systick_interrupt, lower);
311310
#endif

0 commit comments

Comments
 (0)