21 #define LIST_HEAD p_thrd_head
22 #define RUNN_HEAD p_runn_head
23 #define CURR_THRD p_curr_thrd
42 return find_next_running_thread(
RUNN_HEAD);
55 if (*head == NULL || (node->
prior <= (*head)->prior)) {
77 (*runn == NULL || (node->
prior < (*runn)->prior))) {
101 (pth->
pfn == NULL) ||
124 pth->
state = new_state;
void tfm_arch_init_context(struct tfm_arch_ctx_t *p_actx, void *param, uintptr_t pfn, uintptr_t stk_btm, uintptr_t stk_top)
#define THRD_STATE_CREATING
tfm_core_thrd_entry_t pfn
void *(* tfm_core_thrd_entry_t)(void *)
#define THRD_PRIOR_MEDIUM
#define THRD_ERR_INVALID_PARAM
uint32_t tfm_core_thrd_start(struct tfm_core_thread_t *pth)
struct tfm_arch_ctx_t arch_ctx
void tfm_core_thrd_start_scheduler(struct tfm_core_thread_t *pth)
__STATIC_INLINE void tfm_arch_update_ctx(struct tfm_arch_ctx_t *p_actx)
Update architecture context value into hardware.
void * spm_memcpy(void *dest, const void *src, size_t n)
Memory copy function for TF-M core.
struct tfm_core_thread_t * tfm_core_thrd_get_curr_thread(void)
#define TFM_CORE_ASSERT(cond)
#define THRD_STATE_INVALID
void tfm_core_thrd_switch_context(struct tfm_arch_ctx_t *p_actx, struct tfm_core_thread_t *prev, struct tfm_core_thread_t *next)
void tfm_core_thrd_set_state(struct tfm_core_thread_t *pth, uint32_t new_state)
void tfm_core_thrd_activate_schedule(void)
struct tfm_core_thread_t * next
__STATIC_INLINE void tfm_arch_trigger_pendsv(void)
#define THRD_STATE_RUNNING
struct tfm_core_thread_t * tfm_core_thrd_get_next_thread(void)
void tfm_core_thrd_init(struct tfm_core_thread_t *pth, tfm_core_thrd_entry_t pfn, void *param, uintptr_t stk_top, uintptr_t stk_btm)