Core: thread allocation shortcut (#2007)
* Core: thread alloc+set shortcut * Apps: use thread allocation shortcut * Mark some service threads as services * Init BT as soon as possible Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -110,11 +110,8 @@ static void updater_start_app() {
|
||||
* inside loader process, at startup.
|
||||
* So, accessing its record would cause a deadlock
|
||||
*/
|
||||
FuriThread* thread = furi_thread_alloc();
|
||||
|
||||
furi_thread_set_name(thread, "UpdateAppSpawner");
|
||||
furi_thread_set_stack_size(thread, 768);
|
||||
furi_thread_set_callback(thread, updater_spawner_thread_worker);
|
||||
FuriThread* thread =
|
||||
furi_thread_alloc_ex("UpdateAppSpawner", 768, updater_spawner_thread_worker, NULL);
|
||||
furi_thread_set_state_callback(thread, updater_spawner_thread_cleanup);
|
||||
furi_thread_set_state_context(thread, thread);
|
||||
furi_thread_start(thread);
|
||||
|
@@ -216,11 +216,8 @@ UpdateTask* update_task_alloc() {
|
||||
update_task->boot_mode = furi_hal_rtc_get_boot_mode();
|
||||
update_task->update_path = furi_string_alloc();
|
||||
|
||||
FuriThread* thread = update_task->thread = furi_thread_alloc();
|
||||
|
||||
furi_thread_set_name(thread, "UpdateWorker");
|
||||
furi_thread_set_stack_size(thread, 5120);
|
||||
furi_thread_set_context(thread, update_task);
|
||||
FuriThread* thread = update_task->thread =
|
||||
furi_thread_alloc_ex("UpdateWorker", 5120, NULL, update_task);
|
||||
|
||||
furi_thread_set_state_callback(thread, update_task_worker_thread_cb);
|
||||
furi_thread_set_state_context(thread, update_task);
|
||||
|
Reference in New Issue
Block a user