1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

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:
Sergey Gavrilov
2022-11-23 22:49:17 +10:00
committed by GitHub
parent b9c483fbf8
commit c511c67e71
38 changed files with 94 additions and 195 deletions

View File

@@ -370,11 +370,7 @@ RpcSession* rpc_session_open(Rpc* rpc) {
};
rpc_add_handler(session, PB_Main_stop_session_tag, &rpc_handler);
session->thread = furi_thread_alloc();
furi_thread_set_name(session->thread, "RpcSessionWorker");
furi_thread_set_stack_size(session->thread, 3072);
furi_thread_set_context(session->thread, session);
furi_thread_set_callback(session->thread, rpc_session_worker);
session->thread = furi_thread_alloc_ex("RpcSessionWorker", 3072, rpc_session_worker, session);
furi_thread_set_state_context(session->thread, session);
furi_thread_set_state_callback(session->thread, rpc_session_free_callback);