Go to the documentation of this file.
6 #ifndef ABTD_H_INCLUDED
7 #define ABTD_H_INCLUDED
26 void *(*thread_f)(
void *);
33 #ifdef HAVE_PTHREAD_BARRIER_INIT
44 #define ABTD_XSTREAM_LOCAL __thread
64 int max_cpuids,
int *cpuids,
95 #if defined(ABT_CONFIG_USE_CLOCK_GETTIME)
97 typedef struct timespec ABTD_time;
99 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
100 #include <mach/mach_time.h>
101 typedef uint64_t ABTD_time;
103 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
104 #include <sys/time.h>
105 typedef struct timeval ABTD_time;
ABTD_xstream_context_state
@ ABTD_XSTREAM_CONTEXT_STATE_WAITING
void ABTD_ythread_exit(ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread)
ABTU_ret_err int ABTD_affinity_cpuset_apply(ABTD_xstream_context *p_ctx, const ABTD_affinity_cpuset *p_cpuset)
@ ABTD_XSTREAM_CONTEXT_STATE_RUNNING
void ABTD_xstream_context_print(ABTD_xstream_context *p_ctx, FILE *p_os, int indent)
void ABTD_xstream_context_free(ABTD_xstream_context *p_ctx)
struct ABTD_affinity_cpuset ABTD_affinity_cpuset
pthread_mutex_t ABTD_xstream_mutex
@ ABTD_XSTREAM_CONTEXT_STATE_REQ_JOIN
pthread_mutex_t state_lock
struct ABTD_xstream_context ABTD_xstream_context
void ABTD_xstream_context_revive(ABTD_xstream_context *p_ctx)
ABTU_ret_err int ABTD_xstream_context_create(void *(*f_xstream)(void *), void *p_arg, ABTD_xstream_context *p_ctx)
@ ABTD_XSTREAM_CONTEXT_STATE_REQ_TERMINATE
void ABTD_xstream_context_set_self(ABTD_xstream_context *p_ctx)
pthread_cond_t state_cond
void ABTD_time_init(void)
ABTU_ret_err int ABTD_affinity_list_create(const char *affinity_str, ABTD_affinity_list **pp_affinity_list)
void ABTD_env_init(ABTI_global *p_global)
void ABTD_affinity_finalize(ABTI_global *p_global)
@ ABTD_XSTREAM_CONTEXT_STATE_UNINIT
ABTD_xstream_context_state state
double ABTD_time_read_sec(ABTD_time *p_time)
void ABTD_time_get(ABTD_time *p_time)
int ABTD_affinity_cpuset_apply_default(ABTD_xstream_context *p_ctx, int rank)
struct ABTD_affinity_id_list ABTD_affinity_id_list
ABTU_ret_err int ABTD_affinity_cpuset_read(ABTD_xstream_context *p_ctx, int max_cpuids, int *cpuids, int *p_num_cpuids)
void ABTD_xstream_context_join(ABTD_xstream_context *p_ctx)
void ABTD_affinity_init(ABTI_global *p_global, const char *affinity_str)
void ABTD_affinity_list_free(ABTD_affinity_list *p_list)
void ABTD_ythread_cancel(ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread)
void ABTD_affinity_cpuset_destroy(ABTD_affinity_cpuset *p_cpuset)
void * ABTD_xstream_barrier
struct ABTD_affinity_list ABTD_affinity_list
ABTD_affinity_id_list ** p_id_lists