Loading...
Searching...
No Matches
thread_list.h
1#pragma once
2
3#include "base.h"
4#include "common_defines.h"
5#include "thread.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef struct {
13 const char* app_id;
14 const char* name;
16 uint32_t stack_address;
17 size_t heap;
18 uint32_t stack_size;
19 uint32_t stack_min_free;
20 const char*
22 float cpu;
24 // Service variables
26 uint32_t counter_current;
27 uint32_t tick;
29
31typedef struct FuriThreadList FuriThreadList;
32
37FuriThreadList* furi_thread_list_alloc(void);
38
43void furi_thread_list_free(FuriThreadList* instance);
44
51size_t furi_thread_list_size(FuriThreadList* instance);
52
60FuriThreadListItem* furi_thread_list_get_at(FuriThreadList* instance, size_t position);
61
69FuriThreadListItem* furi_thread_list_get_or_insert(FuriThreadList* instance, FuriThread* thread);
70
77float furi_thread_list_get_isr_time(FuriThreadList* instance);
78
79#ifdef __cplusplus
80}
81#endif
Definition thread.c:38
Definition thread_list.h:11
uint32_t stack_address
Thread stack address.
Definition thread_list.h:16
uint32_t counter_previous
Thread previous runtime counter.
Definition thread_list.h:25
const char * app_id
Thread application id, valid while it is running.
Definition thread_list.h:13
FuriThreadPriority priority
Thread priority.
Definition thread_list.h:15
uint32_t stack_size
Thread stack size.
Definition thread_list.h:18
float cpu
Thread CPU usage time in percents (including interrupts happened while running)
Definition thread_list.h:22
const char * state
Thread state, can be: "Running", "Ready", "Blocked", "Suspended", "Deleted", "Invalid".
Definition thread_list.h:21
uint32_t counter_current
Thread current runtime counter.
Definition thread_list.h:26
uint32_t stack_min_free
Thread minimum of the stack size ever reached.
Definition thread_list.h:19
FuriThread * thread
Pointer to FuriThread, valid while it is running.
Definition thread_list.h:12
uint32_t tick
Thread last seen tick.
Definition thread_list.h:27
size_t heap
Thread heap size if tracking enabled, 0 - otherwise.
Definition thread_list.h:17
const char * name
Thread name, valid while it is running.
Definition thread_list.h:14
Furi: Furi Thread API.
FuriThreadPriority
Enumeration of possible FuriThread priorities.
Definition thread.h:33
struct FuriThreadList FuriThreadList
FuriThreadList type.
Definition thread.h:51