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

@@ -37,11 +37,7 @@ iButtonWorker* ibutton_worker_alloc() {
worker->emulate_cb = NULL;
worker->cb_ctx = NULL;
worker->thread = furi_thread_alloc();
furi_thread_set_name(worker->thread, "ibutton_worker");
furi_thread_set_callback(worker->thread, ibutton_worker_thread);
furi_thread_set_context(worker->thread, worker);
furi_thread_set_stack_size(worker->thread, 2048);
worker->thread = furi_thread_alloc_ex("iButtonWorker", 2048, ibutton_worker_thread, worker);
worker->protocols = protocol_dict_alloc(ibutton_protocols, iButtonProtocolMax);