ARGOBOTS  4dc37e16e1b227a480715ab67dae1dcfb4d2d4e0
Macros | Functions
abtd_env.c File Reference
#include "abti.h"
#include <unistd.h>
#include <strings.h>
Include dependency graph for abtd_env.c:

Go to the source code of this file.

Macros

#define ABTD_KEY_TABLE_DEFAULT_SIZE   4
 
#define ABTD_SCHED_DEFAULT_STACKSIZE   (4 * 1024 * 1024)
 
#define ABTD_SCHED_EVENT_FREQ   50
 
#define ABTD_SCHED_SLEEP_NSEC   100
 
#define ABTD_SYS_PAGE_SIZE   4096
 
#define ABTD_HUGE_PAGE_SIZE   (2 * 1024 * 1024)
 
#define ABTD_MEM_PAGE_SIZE   (2 * 1024 * 1024)
 
#define ABTD_MEM_STACK_PAGE_SIZE   (8 * 1024 * 1024)
 
#define ABTD_MEM_MAX_NUM_STACKS   1024
 
#define ABTD_MEM_MAX_TOTAL_STACK_SIZE   (64 * 1024 * 1024)
 
#define ABTD_MEM_MAX_NUM_DESCS   4096
 
#define ABTD_ENV_INT_MAX   ((int)(INT_MAX / 2))
 
#define ABTD_ENV_UINT32_MAX   ((uint32_t)(UINT32_MAX / 2))
 
#define ABTD_ENV_UINT64_MAX   ((uint64_t)(UINT64_MAX / 2))
 
#define ABTD_ENV_SIZE_MAX   ((size_t)(SIZE_MAX / 2))
 

Functions

static uint32_t roundup_pow2_uint32 (uint32_t val)
 
static size_t roundup_pow2_size (size_t val)
 
static const char * get_abt_env (const char *env_suffix)
 
static ABT_bool is_false (const char *str, ABT_bool include0)
 
static ABT_bool is_true (const char *str, ABT_bool include1)
 
static ABT_bool load_env_bool (const char *env_suffix, ABT_bool default_val)
 
static int load_env_int (const char *env_suffix, int default_val, int min_val, int max_val)
 
static uint32_t load_env_uint32 (const char *env_suffix, uint32_t default_val, uint32_t min_val, uint32_t max_val)
 
static uint64_t load_env_uint64 (const char *env_suffix, uint64_t default_val, uint64_t min_val, uint64_t max_val)
 
static size_t load_env_size (const char *env_suffix, size_t default_val, size_t min_val, size_t max_val)
 
void ABTD_env_init (ABTI_global *p_global)
 
ABT_bool ABTD_env_get_use_debug (void)
 
ABT_bool ABTD_env_get_use_logging (void)
 
ABT_bool ABTD_env_get_print_config (void)
 
int ABTD_env_get_max_xstreams (void)
 
uint32_t ABTD_env_key_table_size (void)
 
size_t ABTD_env_get_sys_pagesize (void)
 
size_t ABTD_env_get_thread_stacksize (void)
 
size_t ABTD_env_get_sched_stacksize (void)
 
uint32_t ABTD_env_get_sched_event_freq (void)
 
uint64_t ABTD_env_get_sched_sleep_nsec (void)
 
ABT_bool ABTD_env_get_stack_guard_mprotect (ABT_bool *is_strict)
 

Macro Definition Documentation

◆ ABTD_ENV_INT_MAX

#define ABTD_ENV_INT_MAX   ((int)(INT_MAX / 2))

Definition at line 25 of file abtd_env.c.

◆ ABTD_ENV_SIZE_MAX

#define ABTD_ENV_SIZE_MAX   ((size_t)(SIZE_MAX / 2))

Definition at line 28 of file abtd_env.c.

◆ ABTD_ENV_UINT32_MAX

#define ABTD_ENV_UINT32_MAX   ((uint32_t)(UINT32_MAX / 2))

Definition at line 26 of file abtd_env.c.

◆ ABTD_ENV_UINT64_MAX

#define ABTD_ENV_UINT64_MAX   ((uint64_t)(UINT64_MAX / 2))

Definition at line 27 of file abtd_env.c.

◆ ABTD_HUGE_PAGE_SIZE

#define ABTD_HUGE_PAGE_SIZE   (2 * 1024 * 1024)

Definition at line 16 of file abtd_env.c.

◆ ABTD_KEY_TABLE_DEFAULT_SIZE

#define ABTD_KEY_TABLE_DEFAULT_SIZE   4

Definition at line 10 of file abtd_env.c.

◆ ABTD_MEM_MAX_NUM_DESCS

#define ABTD_MEM_MAX_NUM_DESCS   4096

Definition at line 21 of file abtd_env.c.

◆ ABTD_MEM_MAX_NUM_STACKS

#define ABTD_MEM_MAX_NUM_STACKS   1024

Definition at line 19 of file abtd_env.c.

◆ ABTD_MEM_MAX_TOTAL_STACK_SIZE

#define ABTD_MEM_MAX_TOTAL_STACK_SIZE   (64 * 1024 * 1024)

Definition at line 20 of file abtd_env.c.

◆ ABTD_MEM_PAGE_SIZE

#define ABTD_MEM_PAGE_SIZE   (2 * 1024 * 1024)

Definition at line 17 of file abtd_env.c.

◆ ABTD_MEM_STACK_PAGE_SIZE

#define ABTD_MEM_STACK_PAGE_SIZE   (8 * 1024 * 1024)

Definition at line 18 of file abtd_env.c.

◆ ABTD_SCHED_DEFAULT_STACKSIZE

#define ABTD_SCHED_DEFAULT_STACKSIZE   (4 * 1024 * 1024)

Definition at line 11 of file abtd_env.c.

◆ ABTD_SCHED_EVENT_FREQ

#define ABTD_SCHED_EVENT_FREQ   50

Definition at line 12 of file abtd_env.c.

◆ ABTD_SCHED_SLEEP_NSEC

#define ABTD_SCHED_SLEEP_NSEC   100

Definition at line 13 of file abtd_env.c.

◆ ABTD_SYS_PAGE_SIZE

#define ABTD_SYS_PAGE_SIZE   4096

Definition at line 15 of file abtd_env.c.

Function Documentation

◆ ABTD_env_get_max_xstreams()

int ABTD_env_get_max_xstreams ( void  )

Definition at line 261 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_get_print_config()

ABT_bool ABTD_env_get_print_config ( void  )

Definition at line 255 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_get_sched_event_freq()

uint32_t ABTD_env_get_sched_event_freq ( void  )

Definition at line 320 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_get_sched_sleep_nsec()

uint64_t ABTD_env_get_sched_sleep_nsec ( void  )

Definition at line 327 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_get_sched_stacksize()

size_t ABTD_env_get_sched_stacksize ( void  )

Definition at line 304 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_get_stack_guard_mprotect()

ABT_bool ABTD_env_get_stack_guard_mprotect ( ABT_bool is_strict)

◆ ABTD_env_get_sys_pagesize()

size_t ABTD_env_get_sys_pagesize ( void  )

◆ ABTD_env_get_thread_stacksize()

size_t ABTD_env_get_thread_stacksize ( void  )

Definition at line 288 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_get_use_debug()

ABT_bool ABTD_env_get_use_debug ( void  )

Definition at line 230 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_get_use_logging()

ABT_bool ABTD_env_get_use_logging ( void  )

Definition at line 241 of file abtd_env.c.

Referenced by ABT_info_query_config(), and ABTD_env_init().

◆ ABTD_env_init()

void ABTD_env_init ( ABTI_global p_global)

Definition at line 45 of file abtd_env.c.

Referenced by init_library().

◆ ABTD_env_key_table_size()

uint32_t ABTD_env_key_table_size ( void  )

Definition at line 268 of file abtd_env.c.

Referenced by ABTD_env_init().

◆ get_abt_env()

static const char * get_abt_env ( const char *  env_suffix)
static

◆ is_false()

static ABT_bool is_false ( const char *  str,
ABT_bool  include0 
)
static

Definition at line 421 of file abtd_env.c.

Referenced by ABTD_env_init(), and load_env_bool().

◆ is_true()

static ABT_bool is_true ( const char *  str,
ABT_bool  include1 
)
static

Definition at line 432 of file abtd_env.c.

Referenced by load_env_bool().

◆ load_env_bool()

static ABT_bool load_env_bool ( const char *  env_suffix,
ABT_bool  default_val 
)
static

◆ load_env_int()

static int load_env_int ( const char *  env_suffix,
int  default_val,
int  min_val,
int  max_val 
)
static

Definition at line 459 of file abtd_env.c.

Referenced by ABTD_env_get_max_xstreams().

◆ load_env_size()

static size_t load_env_size ( const char *  env_suffix,
size_t  default_val,
size_t  min_val,
size_t  max_val 
)
static

◆ load_env_uint32()

static uint32_t load_env_uint32 ( const char *  env_suffix,
uint32_t  default_val,
uint32_t  min_val,
uint32_t  max_val 
)
static

◆ load_env_uint64()

static uint64_t load_env_uint64 ( const char *  env_suffix,
uint64_t  default_val,
uint64_t  min_val,
uint64_t  max_val 
)
static

Definition at line 494 of file abtd_env.c.

Referenced by ABTD_env_get_sched_sleep_nsec().

◆ roundup_pow2_size()

static size_t roundup_pow2_size ( size_t  val)
static

Definition at line 388 of file abtd_env.c.

Referenced by ABTD_env_get_sys_pagesize(), and ABTD_env_init().

◆ roundup_pow2_uint32()

static uint32_t roundup_pow2_uint32 ( uint32_t  val)
static

Definition at line 373 of file abtd_env.c.

Referenced by ABTD_env_key_table_size().