Skip to content

Commit d823f88

Browse files
keith-zephyrfabiobaltieri
authored andcommitted
kernel: move _static_thread_data to ROM
Move the _static_thread_data created by K_THREAD_DEFINE to ROM. This change also deletes the unused .init_abort field from the static thread data. Signed-off-by: Keith Short <[email protected]>
1 parent 7c3bf20 commit d823f88

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

include/zephyr/kernel.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ struct _static_thread_data {
634634

635635
#define Z_THREAD_INITIALIZER(thread, stack, stack_size, \
636636
entry, p1, p2, p3, \
637-
prio, options, delay, abort, tname) \
637+
prio, options, delay, tname) \
638638
{ \
639639
.init_thread = (thread), \
640640
.init_stack = (stack), \
@@ -646,7 +646,6 @@ struct _static_thread_data {
646646
.init_prio = (prio), \
647647
.init_options = (options), \
648648
.init_delay = (delay), \
649-
.init_abort = (abort), \
650649
.init_name = STRINGIFY(tname), \
651650
}
652651

@@ -692,7 +691,7 @@ struct _static_thread_data {
692691
Z_THREAD_INITIALIZER(&_k_thread_obj_##name, \
693692
_k_thread_stack_##name, stack_size, \
694693
entry, p1, p2, p3, prio, options, delay, \
695-
NULL, name); \
694+
name); \
696695
const k_tid_t name = (k_tid_t)&_k_thread_obj_##name
697696

698697
/**

include/zephyr/linker/common-ram.ld

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
__log_dynamic_end = .;
7474
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
7575

76-
ITERABLE_SECTION_RAM(_static_thread_data, 4)
77-
7876
#ifdef CONFIG_USERSPACE
7977
/* All kernel objects within are assumed to be either completely
8078
* initialized at build time, or initialized automatically at runtime

include/zephyr/linker/common-rom/common-rom-kernel-devices.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868

6969
ITERABLE_SECTION_ROM(k_p4wq_initparam, 4)
7070

71+
ITERABLE_SECTION_ROM(_static_thread_data, 4)
72+
7173
#if defined(CONFIG_PCIE)
7274
SECTION_DATA_PROLOGUE(irq_alloc,,)
7375
{

0 commit comments

Comments
 (0)