mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fixes for thread state changes
This commit is contained in:
Submodule applications/external updated: 06f4573aa1...57d118e929
@@ -1,21 +1,12 @@
|
||||
#include "run_parallel.h"
|
||||
|
||||
#include <core/timer.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static void run_parallel_pending_callback(void* context, uint32_t arg) {
|
||||
UNUSED(arg);
|
||||
|
||||
FuriThread* thread = context;
|
||||
furi_thread_join(thread);
|
||||
furi_thread_free(thread);
|
||||
}
|
||||
|
||||
static void run_parallel_thread_state(FuriThreadState state, void* context) {
|
||||
static void run_parallel_thread_state(FuriThread* thread, FuriThreadState state, void* context) {
|
||||
UNUSED(context);
|
||||
|
||||
if(state == FuriThreadStateStopped) {
|
||||
furi_timer_pending_callback(run_parallel_pending_callback, furi_thread_get_current(), 0);
|
||||
furi_thread_free(thread);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user