ARGOBOTS  1.1
Data Structures | Macros | Typedefs | Enumerations | Functions
abtd.h File Reference
#include <pthread.h>
#include "abtd_atomic.h"
#include "abtd_context.h"
#include "abtd_spinlock.h"
#include "abtd_futex.h"
#include "abtd_stream.h"
#include "abtd_ythread.h"
Include dependency graph for abtd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ABTD_xstream_context
 
struct  ABTD_affinity_cpuset
 
struct  ABTD_affinity_id_list
 
struct  ABTD_affinity_list
 

Macros

#define __USE_GNU   1
 
#define ABTD_XSTREAM_LOCAL   __thread
 

Typedefs

typedef struct ABTD_xstream_context ABTD_xstream_context
 
typedef pthread_mutex_t ABTD_xstream_mutex
 
typedef void * ABTD_xstream_barrier
 
typedef struct ABTD_affinity_cpuset ABTD_affinity_cpuset
 
typedef struct ABTD_affinity_id_list ABTD_affinity_id_list
 
typedef struct ABTD_affinity_list ABTD_affinity_list
 

Enumerations

enum  ABTD_xstream_context_state {
  ABTD_XSTREAM_CONTEXT_STATE_RUNNING, ABTD_XSTREAM_CONTEXT_STATE_WAITING, ABTD_XSTREAM_CONTEXT_STATE_REQ_JOIN, ABTD_XSTREAM_CONTEXT_STATE_REQ_TERMINATE,
  ABTD_XSTREAM_CONTEXT_STATE_UNINIT
}
 

Functions

void ABTD_env_init (ABTI_global *p_global)
 
ABTU_ret_err int ABTD_xstream_context_create (void *(*f_xstream)(void *), void *p_arg, ABTD_xstream_context *p_ctx)
 
void ABTD_xstream_context_free (ABTD_xstream_context *p_ctx)
 
void ABTD_xstream_context_join (ABTD_xstream_context *p_ctx)
 
void ABTD_xstream_context_revive (ABTD_xstream_context *p_ctx)
 
void ABTD_xstream_context_set_self (ABTD_xstream_context *p_ctx)
 
void ABTD_xstream_context_print (ABTD_xstream_context *p_ctx, FILE *p_os, int indent)
 
void ABTD_affinity_init (ABTI_global *p_global, const char *affinity_str)
 
void ABTD_affinity_finalize (ABTI_global *p_global)
 
ABTU_ret_err int ABTD_affinity_cpuset_read (ABTD_xstream_context *p_ctx, int max_cpuids, int *cpuids, int *p_num_cpuids)
 
ABTU_ret_err int ABTD_affinity_cpuset_apply (ABTD_xstream_context *p_ctx, const ABTD_affinity_cpuset *p_cpuset)
 
int ABTD_affinity_cpuset_apply_default (ABTD_xstream_context *p_ctx, int rank)
 
void ABTD_affinity_cpuset_destroy (ABTD_affinity_cpuset *p_cpuset)
 
ABTU_ret_err int ABTD_affinity_list_create (const char *affinity_str, ABTD_affinity_list **pp_affinity_list)
 
void ABTD_affinity_list_free (ABTD_affinity_list *p_list)
 
void ABTD_ythread_exit (ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread)
 
void ABTD_ythread_cancel (ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread)
 
void ABTD_time_init (void)
 
void ABTD_time_get (ABTD_time *p_time)
 
double ABTD_time_read_sec (ABTD_time *p_time)
 

Macro Definition Documentation

◆ __USE_GNU

#define __USE_GNU   1

Definition at line 9 of file abtd.h.

◆ ABTD_XSTREAM_LOCAL

#define ABTD_XSTREAM_LOCAL   __thread

Definition at line 44 of file abtd.h.

Typedef Documentation

◆ ABTD_affinity_cpuset

◆ ABTD_affinity_id_list

◆ ABTD_affinity_list

◆ ABTD_xstream_barrier

typedef void* ABTD_xstream_barrier

Definition at line 36 of file abtd.h.

◆ ABTD_xstream_context

◆ ABTD_xstream_mutex

typedef pthread_mutex_t ABTD_xstream_mutex

Definition at line 32 of file abtd.h.

Enumeration Type Documentation

◆ ABTD_xstream_context_state

Enumerator
ABTD_XSTREAM_CONTEXT_STATE_RUNNING 
ABTD_XSTREAM_CONTEXT_STATE_WAITING 
ABTD_XSTREAM_CONTEXT_STATE_REQ_JOIN 
ABTD_XSTREAM_CONTEXT_STATE_REQ_TERMINATE 
ABTD_XSTREAM_CONTEXT_STATE_UNINIT 

Definition at line 17 of file abtd.h.

Function Documentation

◆ ABTD_affinity_cpuset_apply()

ABTU_ret_err int ABTD_affinity_cpuset_apply ( ABTD_xstream_context p_ctx,
const ABTD_affinity_cpuset p_cpuset 
)

Definition at line 436 of file abtd_affinity.c.

◆ ABTD_affinity_cpuset_apply_default()

int ABTD_affinity_cpuset_apply_default ( ABTD_xstream_context p_ctx,
int  rank 
)

Definition at line 442 of file abtd_affinity.c.

Referenced by ABT_xstream_set_rank(), and xstream_create().

◆ ABTD_affinity_cpuset_destroy()

void ABTD_affinity_cpuset_destroy ( ABTD_affinity_cpuset p_cpuset)

Definition at line 450 of file abtd_affinity.c.

Referenced by ABTD_affinity_finalize(), and ABTD_affinity_init().

◆ ABTD_affinity_cpuset_read()

ABTU_ret_err int ABTD_affinity_cpuset_read ( ABTD_xstream_context p_ctx,
int  max_cpuids,
int *  cpuids,
int *  p_num_cpuids 
)

Definition at line 428 of file abtd_affinity.c.

◆ ABTD_affinity_finalize()

void ABTD_affinity_finalize ( ABTI_global p_global)

Definition at line 404 of file abtd_affinity.c.

Referenced by finailze_library(), and init_library().

◆ ABTD_affinity_init()

void ABTD_affinity_init ( ABTI_global p_global,
const char *  affinity_str 
)

Definition at line 296 of file abtd_affinity.c.

Referenced by ABTD_env_init().

◆ ABTD_affinity_list_create()

ABTU_ret_err int ABTD_affinity_list_create ( const char *  affinity_str,
ABTD_affinity_list **  pp_affinity_list 
)

Definition at line 337 of file abtd_affinity_parser.c.

Referenced by ABTD_affinity_init().

◆ ABTD_affinity_list_free()

void ABTD_affinity_list_free ( ABTD_affinity_list p_list)

Definition at line 356 of file abtd_affinity_parser.c.

Referenced by ABTD_affinity_init().

◆ ABTD_env_init()

void ABTD_env_init ( ABTI_global p_global)

Definition at line 47 of file abtd_env.c.

Referenced by init_library().

◆ ABTD_time_get()

void ABTD_time_get ( ABTD_time *  p_time)

◆ ABTD_time_init()

void ABTD_time_init ( void  )

Definition at line 11 of file abtd_time.c.

Referenced by ABTD_env_init(), and ABTD_time_read_sec().

◆ ABTD_time_read_sec()

double ABTD_time_read_sec ( ABTD_time *  p_time)

◆ ABTD_xstream_context_create()

ABTU_ret_err int ABTD_xstream_context_create ( void *(*)(void *)  f_xstream,
void *  p_arg,
ABTD_xstream_context p_ctx 
)

Definition at line 48 of file abtd_stream.c.

Referenced by xstream_create().

◆ ABTD_xstream_context_free()

void ABTD_xstream_context_free ( ABTD_xstream_context p_ctx)

Definition at line 90 of file abtd_stream.c.

◆ ABTD_xstream_context_join()

void ABTD_xstream_context_join ( ABTD_xstream_context p_ctx)

Definition at line 112 of file abtd_stream.c.

◆ ABTD_xstream_context_print()

void ABTD_xstream_context_print ( ABTD_xstream_context p_ctx,
FILE *  p_os,
int  indent 
)

Definition at line 143 of file abtd_stream.c.

◆ ABTD_xstream_context_revive()

void ABTD_xstream_context_revive ( ABTD_xstream_context p_ctx)

Definition at line 128 of file abtd_stream.c.

Referenced by ABT_xstream_revive().

◆ ABTD_xstream_context_set_self()

void ABTD_xstream_context_set_self ( ABTD_xstream_context p_ctx)

Definition at line 138 of file abtd_stream.c.

◆ ABTD_ythread_cancel()

void ABTD_ythread_cancel ( ABTI_xstream p_local_xstream,
ABTI_ythread p_ythread 
)

Definition at line 120 of file abtd_ythread.c.

Referenced by xstream_schedule_ythread().

◆ ABTD_ythread_exit()

void ABTD_ythread_exit ( ABTI_xstream p_local_xstream,
ABTI_ythread p_ythread 
)

Definition at line 30 of file abtd_ythread.c.

Referenced by ABTI_ythread_exit().