ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
abtd_context.h
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 #ifndef ABTD_CONTEXT_H_INCLUDED
7 #define ABTD_CONTEXT_H_INCLUDED
8 
9 #include "abt_config.h"
10 
11 #ifndef ABT_CONFIG_USE_FCONTEXT
12 #ifndef _XOPEN_SOURCE
13 #define _XOPEN_SOURCE
14 #endif
15 #include <ucontext.h>
16 #endif
17 
19 
23 
24 static inline ABTD_ythread_context *
27 {
29 }
30 
31 static inline ABTD_ythread_context *
34 {
36 }
37 
40 {
41  ABTD_atomic_relaxed_store_ptr(&ptr->val, (void *)p_ctx);
42 }
43 
46 {
47  ABTD_atomic_release_store_ptr(&ptr->val, (void *)p_ctx);
48 }
49 
51 void ABTD_ythread_print_context(ABTI_ythread *p_ythread, FILE *p_os,
52  int indent);
53 
54 #ifdef ABT_CONFIG_USE_FCONTEXT
55 #include "abtd_fcontext.h"
56 #else
57 #include "abtd_ucontext.h"
58 #endif
59 
60 #endif /* ABTD_CONTEXT_H_INCLUDED */
ABTD_atomic_release_store_ythread_context_ptr
static void ABTD_atomic_release_store_ythread_context_ptr(ABTD_ythread_context_atomic_ptr *ptr, ABTD_ythread_context *p_ctx)
Definition: abtd_context.h:44
ABTD_atomic_relaxed_store_ythread_context_ptr
static void ABTD_atomic_relaxed_store_ythread_context_ptr(ABTD_ythread_context_atomic_ptr *ptr, ABTD_ythread_context *p_ctx)
Definition: abtd_context.h:38
ABTD_atomic_relaxed_load_ythread_context_ptr
static ABTD_ythread_context * ABTD_atomic_relaxed_load_ythread_context_ptr(const ABTD_ythread_context_atomic_ptr *ptr)
Definition: abtd_context.h:25
abtd_fcontext.h
ABTD_ythread_context
Definition: abtd_fcontext.h:56
ABTD_atomic_ptr
Definition: abtd_atomic.h:39
abt_config.h
ABTD_atomic_release_store_ptr
static void ABTD_atomic_release_store_ptr(ABTD_atomic_ptr *ptr, void *val)
Definition: abtd_atomic.h:1136
ABTD_ythread_context_atomic_ptr
Definition: abtd_context.h:20
ABTD_ythread_context_atomic_ptr::val
ABTD_atomic_ptr val
Definition: abtd_context.h:21
ABTI_ythread
Definition: abti.h:456
ABTD_atomic_acquire_load_ptr
static void * ABTD_atomic_acquire_load_ptr(const ABTD_atomic_ptr *ptr)
Definition: abtd_atomic.h:979
ABTD_ythread_func_wrapper
void ABTD_ythread_func_wrapper(ABTD_ythread_context *p_arg)
Definition: abtd_ythread.c:8
ABTD_atomic_relaxed_store_ptr
static void ABTD_atomic_relaxed_store_ptr(ABTD_atomic_ptr *ptr, void *val)
Definition: abtd_atomic.h:1055
abtd_ucontext.h
ABTD_ythread_context_atomic_ptr
struct ABTD_ythread_context_atomic_ptr ABTD_ythread_context_atomic_ptr
ABTD_atomic_relaxed_load_ptr
static void * ABTD_atomic_relaxed_load_ptr(const ABTD_atomic_ptr *ptr)
Definition: abtd_atomic.h:846
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
ABTD_ythread_print_context
void ABTD_ythread_print_context(ABTI_ythread *p_ythread, FILE *p_os, int indent)
Definition: abtd_ythread.c:18