Motr
M0
|
#include <thread.h>
Data Fields | |
enum m0_thread_state | t_state |
struct m0_thread_handle | t_h |
int(* | t_init )(void *) |
void(* | t_func )(void *) |
void * | t_arg |
struct m0_semaphore | t_wait |
int | t_initrc |
struct m0_thread_tls | t_tls |
char | t_namebuf [M0_THREAD_NAME_LEN] |
Control block for a thread.
States
A thread control block can be in one of the following states:
Concurrency control
A user is responsible for serialising access to a control block. For example, there should be no concurrent calls to m0_thread_init() or m0_thread_join() for the same m0_thread.
Liveness
Implementation only accesses control block as part of explicit calls to m0_thread interface functions. A user is free to destroy the control block at any moment, except for the possible resource leak in the case of running (and not yet joined) thread.
struct m0_thread_handle t_h |
char t_namebuf[M0_THREAD_NAME_LEN] |
enum m0_thread_state t_state |
struct m0_thread_tls t_tls |
struct m0_semaphore t_wait |