Data Structures | |
| struct | l4thread_exit_desc |
| Exit functions descriptor, see L4THREAD_EXIT_FN. More... | |
Defines | |
| #define | L4THREAD_EXIT_FN_(vis, name, fn) vis l4thread_exit_desc_t name = { fn, NULL, NULL} |
| Declare exit function, generic version. | |
| #define | L4THREAD_EXIT_FN(name, fn) L4THREAD_EXIT_FN_(,name,fn) |
| Declare exit function (global scope). | |
| #define | L4THREAD_EXIT_FN_STATIC(name, fn) L4THREAD_EXIT_FN_(static,name,fn) |
| Declare exit function (static scope). | |
Typedefs | |
| typedef L4_CV void(* | l4thread_exit_fn_t )(l4thread_t thread, void *data) |
| Exit functions (see l4thread_on_exit()). | |
| typedef struct l4thread_exit_desc | l4thread_exit_desc_t |
| Exit functions descriptor, see L4THREAD_EXIT_FN. | |
Functions | |
| int | l4thread_shutdown (l4thread_t thread) |
| Shutdown thread. | |
| L4_CV void | l4thread_exit (void) __attribute__((noreturn)) |
| Exit current thread. | |
| L4_CV int | l4thread_on_exit (l4thread_exit_desc_t *name, void *data) |
| Register exit function for current thread. | |
..
A thread exits if:
| #define L4THREAD_EXIT_FN_ | ( | vis, | |||
| name, | |||||
| fn | ) | vis l4thread_exit_desc_t name = { fn, NULL, NULL} |
Declare exit function, generic version.
| vis | Scope (global or static) | |
| name | Funtion name to declare | |
| fn | Exit function |
| #define L4THREAD_EXIT_FN | ( | name, | |||
| fn | ) | L4THREAD_EXIT_FN_(,name,fn) |
Declare exit function (global scope).
| name | Funtion name to declare | |
| fn | Exit function |
| #define L4THREAD_EXIT_FN_STATIC | ( | name, | |||
| fn | ) | L4THREAD_EXIT_FN_(static,name,fn) |
Declare exit function (static scope).
| name | Funtion name to declare | |
| fn | Exit function |
| typedef L4_CV void(* l4thread_exit_fn_t)(l4thread_t thread, void *data) |
| int l4thread_shutdown | ( | l4thread_t | thread | ) |
Shutdown thread.
| thread | Thread id of thread to shutdown |
| L4_CV void l4thread_exit | ( | void | ) |
Exit current thread.
Exit current thread, it is equivalent to l4thread_shutdown(l4thread_myself()), but indicates to the compiler that it does not return.
| L4_CV int l4thread_on_exit | ( | l4thread_exit_desc_t * | name, | |
| void * | data | |||
| ) |
Register exit function for current thread.
| name | Exit function descriptor, it must be declared with the L4THREAD_EXIT_FN macros | |
| data | Data pointer which will be passed to the exit function |