TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
thread.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __OS_WRAPPER_THREAD_H__
9 #define __OS_WRAPPER_THREAD_H__
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #include "common.h"
16 
17 /* prototype for the thread entry function */
18 typedef void (*os_wrapper_thread_func) (void *argument);
19 
33 void *os_wrapper_thread_new(const char *name, int32_t stack_size,
34  os_wrapper_thread_func func, void *arg,
35  uint32_t priority);
42 
52 uint32_t os_wrapper_thread_get_priority(void *handle, uint32_t *priority);
53 
57 void os_wrapper_thread_exit(void);
58 
71 uint32_t os_wrapper_thread_set_flag(void *handle, uint32_t flags);
72 
83 uint32_t os_wrapper_thread_set_flag_isr(void *handle, uint32_t flags);
84 
97 uint32_t os_wrapper_thread_wait_flag(uint32_t flags, uint32_t timeout);
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* __OS_WRAPPER_THREAD_H__ */
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.
void os_wrapper_thread_exit(void)
Exits the calling thread.
uint32_t os_wrapper_thread_set_flag_isr(void *handle, uint32_t flags)
Set the event flags in an interrupt handler for synchronizing a thread specified by handle...
void(* os_wrapper_thread_func)(void *argument)
Definition: thread.h:18
void * os_wrapper_thread_get_handle(void)
Gets current thread handle.
uint32_t os_wrapper_thread_get_priority(void *handle, uint32_t *priority)
Gets thread priority.
uint32_t os_wrapper_thread_wait_flag(uint32_t flags, uint32_t timeout)
Wait for the event flags for synchronizing threads.
uint32_t os_wrapper_thread_set_flag(void *handle, uint32_t flags)
Set the event flags for synchronizing a thread specified by handle.