Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions cores/arduino/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,5 @@ void start_static_threads() {
k_thread_name_set(thread_data->init_thread, thread_data->init_name);
thread_data->init_thread->init_data = thread_data;
}

/*
* Take a sched lock to prevent them from running
* until they are all started.
*/
k_sched_lock();
_FOREACH_STATIC_THREAD(thread_data) {
k_thread_start(thread_data->init_thread);
}
k_sched_unlock();
}
#endif
6 changes: 4 additions & 2 deletions variants/_ldscripts/build-dynamic.ld
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ SECTIONS {
KEEP (*(.ctors))
KEEP (*(.dtors))
KEEP (*(.fini))
}

.static_thread_data_area : {
__static_thread_data_list_start = .;
KEEP(*(SORT_BY_NAME(.__static_thread_data.static.*)));
KEEP(*(.static_thread_data_area SORT_BY_NAME(.__static_thread_data.*)));
__static_thread_data_list_end = .;
}

Expand Down Expand Up @@ -87,4 +89,4 @@ SECTIONS {
.got : {
KEEP(*(.got .got.* .got.plt .got.plt*))
}
}
}
4 changes: 3 additions & 1 deletion variants/_ldscripts/build-static.ld
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ SECTIONS {
KEEP (*(.ctors))
KEEP (*(.dtors))
KEEP (*(.fini))
} >FLASH

.static_thread_data_area : {
__static_thread_data_list_start = .;
KEEP(*(SORT_BY_NAME(.__static_thread_data.static.*)));
KEEP(*(.static_thread_data_area SORT_BY_NAME(.__static_thread_data.*)));
__static_thread_data_list_end = .;
} >FLASH

Expand Down