Skip to content

Commit 658a690

Browse files
authored
Merge pull request #209 from iabdalkader/fix_thread_section_alignment
core: Fix thread section alignment.
2 parents cbf7e44 + 6d9ef00 commit 658a690

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

cores/arduino/threads.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,5 @@ void start_static_threads() {
1919
k_thread_name_set(thread_data->init_thread, thread_data->init_name);
2020
thread_data->init_thread->init_data = thread_data;
2121
}
22-
23-
/*
24-
* Take a sched lock to prevent them from running
25-
* until they are all started.
26-
*/
27-
k_sched_lock();
28-
_FOREACH_STATIC_THREAD(thread_data) {
29-
k_thread_start(thread_data->init_thread);
30-
}
31-
k_sched_unlock();
3222
}
3323
#endif

variants/_ldscripts/build-dynamic.ld

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ SECTIONS {
3434
KEEP (*(.ctors))
3535
KEEP (*(.dtors))
3636
KEEP (*(.fini))
37+
}
3738

39+
.static_thread_data_area : {
3840
__static_thread_data_list_start = .;
39-
KEEP(*(SORT_BY_NAME(.__static_thread_data.static.*)));
41+
KEEP(*(.static_thread_data_area SORT_BY_NAME(.__static_thread_data.*)));
4042
__static_thread_data_list_end = .;
4143
}
4244

@@ -87,4 +89,4 @@ SECTIONS {
8789
.got : {
8890
KEEP(*(.got .got.* .got.plt .got.plt*))
8991
}
90-
}
92+
}

variants/_ldscripts/build-static.ld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ SECTIONS {
2323
KEEP (*(.ctors))
2424
KEEP (*(.dtors))
2525
KEEP (*(.fini))
26+
} >FLASH
2627

28+
.static_thread_data_area : {
2729
__static_thread_data_list_start = .;
28-
KEEP(*(SORT_BY_NAME(.__static_thread_data.static.*)));
30+
KEEP(*(.static_thread_data_area SORT_BY_NAME(.__static_thread_data.*)));
2931
__static_thread_data_list_end = .;
3032
} >FLASH
3133

0 commit comments

Comments
 (0)