ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
6 #ifndef ABTD_FCONTEXT_H_INCLUDED
7 #define ABTD_FCONTEXT_H_INCLUDED
16 return !!p_ftx->
dummy;
24 #if defined(ABT_C_HAVE_VISIBILITY)
25 #define ABT_API_PRIVATE __attribute__((visibility("hidden")))
27 #define ABT_API_PRIVATE
34 void (*f_thread)(
fcontext_t *),
void *p_stacktop,
81 void *p_stacktop,
size_t stacksize)
181 void (*f_cb)(
void *),
void *cb_arg)
191 void (*f_cb)(
void *),
void *cb_arg)
202 void (*f_cb)(
void *),
void *cb_arg)
223 void (*f_peek)(
void *),
void *arg)
void jump_fcontext(fcontext_t *p_new_ctx) ABT_API_PRIVATE
void init_and_switch_with_call_fcontext(void *cb_arg, void(*f_cb)(void *), fcontext_t *p_new_ctx, void(*f_thread)(fcontext_t *), void *p_stacktop, fcontext_t *p_old_ctx) ABT_API_PRIVATE
void switch_with_call_fcontext(void *cb_arg, void(*f_cb)(void *), fcontext_t *p_new_ctx, fcontext_t *p_old_ctx) ABT_API_PRIVATE
int ABT_bool
Boolean type.
static ABTU_noreturn void ABTD_ythread_context_start_and_jump_with_call(ABTD_ythread_context *p_new, void(*f_cb)(void *), void *cb_arg)
static void * ABTD_ythread_context_get_stacktop(ABTD_ythread_context *p_ctx)
static void ABTD_ythread_context_start_and_switch(ABTD_ythread_context *p_old, ABTD_ythread_context *p_new)
void init_and_switch_fcontext(fcontext_t *p_new_ctx, void(*f_thread)(fcontext_t *), void *p_stacktop, fcontext_t *p_old_ctx) ABT_API_PRIVATE
static ABTU_noreturn void ABTD_ythread_context_jump(ABTD_ythread_context *p_new)
static ABTU_noreturn void ABTD_ythread_context_start_and_jump(ABTD_ythread_context *p_new)
static void ABTD_atomic_relaxed_store_ythread_context_ptr(ABTD_ythread_context_atomic_ptr *ptr, ABTD_ythread_context *p_ctx)
void jump_with_call_fcontext(void *cb_arg, void(*f_cb)(void *), fcontext_t *p_new_ctx) ABT_API_PRIVATE
static ABT_bool ABTD_ythread_context_peek(ABTD_ythread_context *p_target_ctx, void(*f_peek)(void *), void *arg)
ABTD_ythread_context_atomic_ptr p_link
static void ABTD_ythread_context_func_wrapper(fcontext_t *p_fctx)
static ABT_bool ABTD_ythread_context_is_started(const ABTD_ythread_context *p_ctx)
#define ABTU_unreachable()
static void ABTD_ythread_context_start_and_switch_with_call(ABTD_ythread_context *p_old, ABTD_ythread_context *p_new, void(*f_cb)(void *), void *cb_arg)
static void ABTD_ythread_context_switch_with_call(ABTD_ythread_context *p_old, ABTD_ythread_context *p_new, void(*f_cb)(void *), void *cb_arg)
static void ABTD_ythread_context_lazy_unset_stack(ABTD_ythread_context *p_ctx)
static void ABTD_ythread_context_reinit(ABTD_ythread_context *p_ctx)
void switch_fcontext(fcontext_t *p_new_ctx, fcontext_t *p_old_ctx) ABT_API_PRIVATE
void init_and_jump_fcontext(fcontext_t *p_new_ctx, void(*f_thread)(fcontext_t *), void *p_stacktop) ABT_API_PRIVATE
static void ABTD_ythread_context_lazy_set_stack(ABTD_ythread_context *p_ctx, void *p_stacktop)
static int ABTDI_fcontext_is_created(const fcontext_t *p_ftx)
#define ABT_TRUE
True constant for ABT_bool.
static ABTU_noreturn void ABTD_ythread_context_jump_with_call(ABTD_ythread_context *p_new, void(*f_cb)(void *), void *cb_arg)
#define ABT_FALSE
False constant for ABT_bool.
static void ABTD_ythread_context_init(ABTD_ythread_context *p_ctx, void *p_stacktop, size_t stacksize)
#define ABTI_UB_ASSERT(cond)
static void ABTD_ythread_context_switch(ABTD_ythread_context *p_old, ABTD_ythread_context *p_new)
static void ABTD_ythread_context_init_lazy(ABTD_ythread_context *p_ctx, size_t stacksize)
void peek_fcontext(void *arg, void(*f_peek)(void *), fcontext_t *p_target_ctx) ABT_API_PRIVATE
void ABTD_ythread_func_wrapper(ABTD_ythread_context *p_arg)
void init_and_jump_with_call_fcontext(void *cb_arg, void(*f_cb)(void *), fcontext_t *p_new_ctx, void(*f_thread)(fcontext_t *), void *p_stacktop) ABT_API_PRIVATE
static size_t ABTD_ythread_context_get_stacksize(ABTD_ythread_context *p_ctx)
static void ABTDI_fcontext_init(fcontext_t *p_ftx)
static ABT_bool ABTD_ythread_context_has_stack(const ABTD_ythread_context *p_ctx)
static ABTD_ythread_context * ABTDI_ythread_context_get_context(fcontext_t *p_fctx)