92 #ifndef __MOTR_DESIM_SIM_H__ 93 #define __MOTR_DESIM_SIM_H__ 97 #if defined(__APPLE__) 100 #define _XOPEN_SOURCE 104 #include <ucontext.h> 275 M0_INTERNAL
unsigned long long sim_rnd(
unsigned long long a,
276 unsigned long long b);
int sim_call_t(struct sim_callout *)
static void ptr(struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
M0_INTERNAL void sim_thread_init(struct sim *state, struct sim_thread *thread, unsigned stacksize, sim_func_t func, void *arg)
M0_INTERNAL void sim_init(struct sim *state)
M0_INTERNAL void sim_chan_fini(struct sim_chan *chan)
M0_INTERNAL void sim_free(void *ptr)
M0_INTERNAL struct sim_thread * sim_thread_current(void)
enum m0_trace_level level
void sim_func_t(struct sim *, struct sim_thread *, void *)
M0_INTERNAL void sim_log(struct sim *s, enum sim_log_level level, const char *format,...)
enum m0_md_lustre_logrec_type __attribute__
M0_INTERNAL void sim_chan_broadcast(struct sim_chan *chan)
M0_INTERNAL void sim_chan_init(struct sim_chan *chan, char *format,...)
M0_INTERNAL void sim_thread_exit(struct sim_thread *thread)
M0_INTERNAL void sim_run(struct sim *state)
M0_INTERNAL void sim_global_fini(void)
M0_INTERNAL void sim_thread_fini(struct sim_thread *thread)
struct sim_callout st_wake
M0_INTERNAL void sim_timer_add(struct sim *state, sim_time_t delta, sim_call_t *cfunc, void *datum)
M0_INTERNAL void sim_sleep(struct sim_thread *thread, sim_time_t nap)
M0_INTERNAL void sim_chan_wait(struct sim_chan *chan, struct sim_thread *thread)
unsigned long long sim_time_t
M0_INTERNAL void sim_chan_signal(struct sim_chan *chan)
M0_INTERNAL unsigned long long sim_rnd(unsigned long long a, unsigned long long b)
M0_INTERNAL void * sim_alloc(size_t size)
M0_INTERNAL void sim_name_vaset(char **name, const char *format, va_list valist)
static struct m0_chan chan[RDWR_REQUEST_MAX]
M0_INTERNAL void sim_timer_rearm(struct sim_callout *call, sim_time_t delta, sim_call_t *cfunc, void *datum)
struct m0_tlink sc_linkage
M0_INTERNAL void sim_name_set(char **name, const char *format,...)
M0_INTERNAL void sim_fini(struct sim *state)
static struct m0_addb2_source * s
M0_INTERNAL int sim_global_init(void)