25 #ifndef __MOTR_LIB_THREAD_H__ 26 #define __MOTR_LIB_THREAD_H__ 139 #define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt, ...) \ 141 typeof(func) __func = (func); \ 142 typeof(arg) __arg = (arg); \ 144 (void)(__func == (void (*)(TYPE))NULL); \ 145 (void)(&__arg == &__dummy); \ 146 m0_thread_init(thread, \ 147 (int (*)(void *))init, \ 148 (void (*)(void *))__func, \ 149 (void *)(unsigned long)__arg, \ 150 namefmt , ## __VA_ARGS__); \ 195 void (*func)(
void *),
void *arg,
const char *namefmt, ...)
284 M0_INTERNAL uint64_t
m0_pid(
void);
static struct m0_semaphore q
M0_INTERNAL int m0_thread_signal(struct m0_thread *q, int sig)
M0_INTERNAL int m0_thread_arch_adopt(struct m0_thread *thread, struct m0 *instance, bool full)
struct m0_addb2_mach * tls_addb2_mach
M0_INTERNAL int m0_threads_once_init(void)
M0_INTERNAL uint64_t m0_process(void)
struct m0 * tls_m0_instance
struct m0_thread_tls t_tls
enum m0_md_lustre_logrec_type __attribute__
struct m0_semaphore t_wait
M0_INTERNAL uint64_t m0_pid(void)
M0_INTERNAL int m0_thread_adopt(struct m0_thread *thread, struct m0 *instance)
M0_INTERNAL int m0_threads_init(struct m0 *instance)
struct m0_thread_arch_tls tls_arch
M0_INTERNAL void * m0_thread_trampoline(void *arg)
static struct m0_thread t[8]
M0_INTERNAL int m0_thread_confine(struct m0_thread *q, const struct m0_bitmap *processors)
int m0_thread_init(struct m0_thread *q, int(*init)(void *), void(*func)(void *), void *arg, const char *namefmt,...)
void m0_thread_fini(struct m0_thread *q)
M0_INTERNAL void m0_enter_awkward(void)
struct m0_addb2_sensor tls_clock
M0_INTERNAL int m0_thread_init_impl(struct m0_thread *q, const char *name)
M0_INTERNAL void m0_threads_fini(void)
M0_INTERNAL void m0_thread_shun(void)
int init(struct workload *w)
M0_INTERNAL void m0_exit_awkward(void)
int m0_thread_join(struct m0_thread *q)
M0_INTERNAL struct m0_thread * m0_thread_self(void)
static struct m0 instance
M0_INTERNAL bool m0_is_awkward(void)
struct m0_thread * tls_self
struct m0_thread_handle t_h
M0_INTERNAL void m0_thread_arch_shun(void)
char t_namebuf[M0_THREAD_NAME_LEN]
M0_INTERNAL void m0_threads_once_fini(void)
enum m0_thread_state t_state