Skip to content

Commit 1bab673

Browse files
committed
cores: Remove redundant k_thread_start() calls for static threads.
According to Zephyr documentation, k_thread_create() both initializes and starts the thread. The second loop that was calling k_thread_start() on each static thread was redundant. Signed-off-by: iabdalkader <[email protected]>
1 parent 00654c5 commit 1bab673

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
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

0 commit comments

Comments
 (0)