27#define AKOS_THREAD_DEFINE(_name, _id, _entry, _arg, _prio, _queue_size, _stack_size) \
28 const thread_t _name __attribute__((used, section("task_desc"))) = { \
29 .id = (thread_id_t)(_id), \
30 .pf_thread = (thread_func_t)(_entry), \
31 .p_arg = (void *)(_arg), \
32 .prio = (uint8_t)(_prio), \
33 .queue_size = (size_t)(_queue_size), \
34 .stack_size = (size_t)(_stack_size), \
52 typedef struct thread thread_t;
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.
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_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.
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.
struct thread_tcb * thread_handle_t