27#if (OS_CFG_USE_SHELL != 0u)
28#define AKOS_THREAD_NAME_INIT(_name) .name = #_name,
30#define AKOS_THREAD_NAME_INIT(_name)
33#define AKOS_THREAD_DEFINE(_name, _id, _entry, _arg, _prio, _queue_size, _stack_size) \
34 const thread_t _name __attribute__((used, section("task_desc"))) = { \
35 AKOS_THREAD_NAME_INIT(_name) \
36 .id = (thread_id_t)(_id), \
37 .pf_thread = (thread_func_t)(_entry), \
38 .p_arg = (void *)(_arg), \
39 .prio = (uint8_t)(_prio), \
40 .queue_size = (size_t)(_queue_size), \
41 .stack_size = (size_t)(_stack_size), \
59 typedef struct thread thread_t;
76#if (OS_CFG_USE_SHELL != 0u)
90#if (OS_CFG_USE_SHELL != 0u)
Build-time configuration macros for AK-mOS.
Message object and message queue APIs.
Static thread descriptor used during thread table registration.
msg_t * akos_thread_wait_for_msg(uint32_t time_out)
Wait for message from current thread queue.
uint8_t akos_thread_get_timer_thread_id(void)
Get the runtime thread ID assigned to the timer thread.
void akos_thread_register_static_threads(void)
Create all statically defined threads and kernel internal threads.
uint8_t akos_thread_get_runtime_count(void)
Get number of runtime thread slots, including internal threads.
uint32_t akos_thread_get_tick(void)
Get current system tick.
void akos_thread_start(void)
Start scheduler state.
uint8_t akos_thread_increment_tick(void)
Tick handler routine called from SysTick.
uint8_t akos_thread_get_app_thread_count(void)
Get number of application threads defined via AKOS_THREAD_DEFINE.
void(* thread_func_t)(void *p_arg)
Thread entry function signature.
void akos_thread_get_runtime_totals(uint32_t *p_idle_ticks, uint32_t *p_total_ticks)
Snapshot accumulated runtime counters.
void akos_thread_delay(const uint32_t tick_to_delay)
Delay current thread by specified ticks.
void akos_thread_post_msg_dynamic(uint8_t des_thread_id, int32_t sig, void *p_content, uint8_t msg_size)
Post dynamic message to destination thread.
uint8_t akos_thread_get_shell_thread_id(void)
Get the runtime thread ID assigned to the shell thread.
thread_state_t
Runtime state of a thread control block.
@ THREAD_STATE_DELAYED_ON_MSG
@ THREAD_STATE_SUSPENDED_ON_MSG
uint8_t akos_thread_get_idle_thread_id(void)
Get the runtime thread ID assigned to the idle thread.
uint8_t thread_id_t
Numeric thread identifier type.
void akos_thread_post_msg_pure(uint8_t des_thread_id, int32_t sig)
Post pure signal message to destination thread.
void akos_thread_get_runtime_snapshot(uint8_t index, thread_runtime_snapshot_t *p_snapshot)
Snapshot one runtime thread slot by index.
struct thread_tcb * thread_handle_t