ARGOBOTS  36a41b57298ad4e16b5ada8c95c81f00dfed4d3c
abtd_ythread.c
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  * See COPYRIGHT in top-level directory.
4  */
5 
6 #include "abti.h"
7 
9 {
10  ABTD_ythread_context *p_ctx = p_arg;
12  p_ythread->thread.f_thread(p_ythread->thread.p_arg);
13 
14  ABTI_xstream *p_local_xstream = p_ythread->thread.p_last_xstream;
15  ABTI_ythread_exit(p_local_xstream, p_ythread);
16 }
17 
18 void ABTD_ythread_print_context(ABTI_ythread *p_ythread, FILE *p_os, int indent)
19 {
20  ABTD_ythread_context *p_ctx = &p_ythread->ctx;
21  fprintf(p_os, "%*sp_ctx : %p\n", indent, "", (void *)p_ctx);
22  fprintf(p_os, "%*sp_link : %p\n", indent, "",
24  &p_ctx->p_link));
25  fflush(p_os);
26 }
ABTI_thread::p_arg
void * p_arg
Definition: abti.h:431
ABTD_ythread_func_wrapper
void ABTD_ythread_func_wrapper(ABTD_ythread_context *p_arg)
Definition: abtd_ythread.c:8
ABTI_xstream
Definition: abti.h:294
ABTD_ythread_context
Definition: abtd_fcontext.h:56
ABTI_ythread_context_get_ythread
static ABTI_ythread * ABTI_ythread_context_get_ythread(ABTD_ythread_context *p_ctx)
Definition: abti_ythread.h:66
abti.h
ABTI_ythread::ctx
ABTD_ythread_context ctx
Definition: abti.h:458
ABTD_ythread_print_context
void ABTD_ythread_print_context(ABTI_ythread *p_ythread, FILE *p_os, int indent)
Definition: abtd_ythread.c:18
ABTI_ythread_exit
static ABTU_noreturn void ABTI_ythread_exit(ABTI_xstream *p_local_xstream, ABTI_ythread *p_self)
Definition: abti_ythread.h:460
ABTI_ythread
Definition: abti.h:456
ABTI_thread::p_last_xstream
ABTI_xstream * p_last_xstream
Definition: abti.h:428
ABTI_ythread::thread
ABTI_thread thread
Definition: abti.h:457
ABTI_thread::f_thread
void(* f_thread)(void *)
Definition: abti.h:430
ABTD_atomic_acquire_load_ythread_context_ptr
static ABTD_ythread_context * ABTD_atomic_acquire_load_ythread_context_ptr(const ABTD_ythread_context_atomic_ptr *ptr)
Definition: abtd_context.h:32