15 #define PS_TEST_TASK_STACK_SIZE (768)
22 static void *test_semaphore;
30 static void test_task_runner(
void *arg)
34 #ifdef TFM_NS_CLIENT_IDENTIFICATION
51 void *current_thread_handle;
52 uint32_t current_thread_priority;
59 if (!test_semaphore) {
65 if (!current_thread_handle) {
67 TEST_FAIL(
"Failed to get current thread ID");
72 ¤t_thread_priority);
75 TEST_FAIL(
"Failed to get current thread priority");
81 test_task_runner, &test_task,
82 current_thread_priority);
85 TEST_FAIL(
"Failed to create test thread");
void * os_wrapper_thread_new(const char *name, int32_t stack_size, os_wrapper_thread_func func, void *arg, uint32_t priority)
Creates a new thread.
uint32_t tfm_nspm_register_client_id(void)
Reports the client ID of this task to TF-M.
void os_wrapper_thread_exit(void)
Exits the calling thread.
#define TEST_FAIL(info_msg)
void * os_wrapper_thread_get_handle(void)
Gets current thread handle.
void * os_wrapper_semaphore_create(uint32_t max_count, uint32_t initial_count, const char *name)
Creates a new semaphore.
#define PS_TEST_TASK_STACK_SIZE
#define OS_WRAPPER_WAIT_FOREVER
void tfm_ps_run_test(const char *thread_name, struct test_result_t *ret, test_func_t *test_func)
Executes the given test function from the specified thread context.
struct test_result_t * ret
uint32_t os_wrapper_thread_get_priority(void *handle, uint32_t *priority)
Gets thread priority.
uint32_t os_wrapper_semaphore_delete(void *handle)
Deletes the semaphore.
void test_func_t(struct test_result_t *ret)
uint32_t os_wrapper_semaphore_release(void *handle)
Releases the semaphore.
uint32_t os_wrapper_semaphore_acquire(void *handle, uint32_t timeout)
Acquires the semaphore.