TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_thread.h File Reference
#include <stdint.h>
#include <stddef.h>
#include "tfm_arch.h"
#include "cmsis_compiler.h"
Include dependency graph for tfm_thread.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tfm_core_thread_t
 

Macros

#define THRD_STATE_CREATING   0
 
#define THRD_STATE_RUNNING   1
 
#define THRD_STATE_BLOCK   2
 
#define THRD_STATE_DETACH   3
 
#define THRD_STATE_INVALID   4
 
#define THRD_ATTR_SECURE_OFFSET   16
 
#define THRD_ATTR_SECURE   (0)
 
#define THRD_ATTR_NON_SECURE   (1 << THRD_ATTR_SECURE_OFFSET)
 
#define THRD_PRIOR_MASK   0xFF
 
#define THRD_PRIOR_HIGHEST   0x0
 
#define THRD_PRIOR_MEDIUM   0x7F
 
#define THRD_PRIOR_LOWEST   0xFF
 
#define THRD_SUCCESS   0
 
#define THRD_ERR_INVALID_PARAM   1
 

Typedefs

typedef void *(* tfm_core_thrd_entry_t )(void *)
 

Functions

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)
 
void __STATIC_INLINE tfm_core_thrd_set_priority (struct tfm_core_thread_t *pth, uint32_t prior)
 
void __STATIC_INLINE tfm_core_thrd_set_secure (struct tfm_core_thread_t *pth, uint32_t attr_secure)
 
void tfm_core_thrd_set_state (struct tfm_core_thread_t *pth, uint32_t new_state)
 
uint32_t __STATIC_INLINE tfm_core_thrd_get_state (struct tfm_core_thread_t *pth)
 
void __STATIC_INLINE tfm_core_thrd_set_retval (struct tfm_core_thread_t *pth, uint32_t retval)
 
uint32_t tfm_core_thrd_start (struct tfm_core_thread_t *pth)
 
struct tfm_core_thread_ttfm_core_thrd_get_curr_thread (void)
 
struct tfm_core_thread_ttfm_core_thrd_get_next_thread (void)
 
void tfm_core_thrd_start_scheduler (struct tfm_core_thread_t *pth)
 
void tfm_core_thrd_activate_schedule (void)
 
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)
 

Macro Definition Documentation

#define THRD_ATTR_NON_SECURE   (1 << THRD_ATTR_SECURE_OFFSET)

Definition at line 25 of file tfm_thread.h.

#define THRD_ATTR_SECURE   (0)

Definition at line 24 of file tfm_thread.h.

#define THRD_ATTR_SECURE_OFFSET   16

Definition at line 23 of file tfm_thread.h.

#define THRD_ERR_INVALID_PARAM   1

Definition at line 35 of file tfm_thread.h.

#define THRD_PRIOR_HIGHEST   0x0

Definition at line 29 of file tfm_thread.h.

#define THRD_PRIOR_LOWEST   0xFF

Definition at line 31 of file tfm_thread.h.

#define THRD_PRIOR_MASK   0xFF

Definition at line 28 of file tfm_thread.h.

#define THRD_PRIOR_MEDIUM   0x7F

Definition at line 30 of file tfm_thread.h.

#define THRD_STATE_BLOCK   2

Definition at line 18 of file tfm_thread.h.

#define THRD_STATE_CREATING   0

Definition at line 16 of file tfm_thread.h.

#define THRD_STATE_DETACH   3

Definition at line 19 of file tfm_thread.h.

#define THRD_STATE_INVALID   4

Definition at line 20 of file tfm_thread.h.

#define THRD_STATE_RUNNING   1

Definition at line 17 of file tfm_thread.h.

#define THRD_SUCCESS   0

Definition at line 34 of file tfm_thread.h.

Typedef Documentation

typedef void*(* tfm_core_thrd_entry_t)(void *)

Definition at line 38 of file tfm_thread.h.

Function Documentation

void tfm_core_thrd_activate_schedule ( void  )

Definition at line 129 of file tfm_thread.c.

Here is the call graph for this function:

Here is the caller graph for this function:

struct tfm_core_thread_t* tfm_core_thrd_get_curr_thread ( void  )

Definition at line 46 of file tfm_thread.c.

Here is the caller graph for this function:

struct tfm_core_thread_t* tfm_core_thrd_get_next_thread ( void  )

Definition at line 36 of file tfm_thread.c.

Here is the caller graph for this function:

uint32_t __STATIC_INLINE tfm_core_thrd_get_state ( struct tfm_core_thread_t pth)

Definition at line 130 of file tfm_thread.h.

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 
)

Definition at line 85 of file tfm_thread.c.

Here is the caller graph for this function:

void __STATIC_INLINE tfm_core_thrd_set_priority ( struct tfm_core_thread_t pth,
uint32_t  prior 
)

Definition at line 82 of file tfm_thread.h.

void __STATIC_INLINE tfm_core_thrd_set_retval ( struct tfm_core_thread_t pth,
uint32_t  retval 
)

Definition at line 146 of file tfm_thread.h.

Here is the caller graph for this function:

void __STATIC_INLINE tfm_core_thrd_set_secure ( struct tfm_core_thread_t pth,
uint32_t  attr_secure 
)

Definition at line 99 of file tfm_thread.h.

void tfm_core_thrd_set_state ( struct tfm_core_thread_t pth,
uint32_t  new_state 
)

Definition at line 120 of file tfm_thread.c.

Here is the caller graph for this function:

uint32_t tfm_core_thrd_start ( struct tfm_core_thread_t pth)

Definition at line 97 of file tfm_thread.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void tfm_core_thrd_start_scheduler ( struct tfm_core_thread_t pth)

Definition at line 134 of file tfm_thread.c.

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 153 of file tfm_thread.c.

Here is the call graph for this function:

Here is the caller graph for this function: