ARGOBOTS  1.1
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_THREAD_DEFAULT_STACKSIZE   16384
 
#define ABTD_SCHED_DEFAULT_STACKSIZE   (4 * 1024 * 1024)
 
#define ABTD_SCHED_EVENT_FREQ   50
 
#define ABTD_SCHED_SLEEP_NSEC   100
 
#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 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)
 

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 12 of file abtd_env.c.

◆ ABTD_SCHED_EVENT_FREQ

#define ABTD_SCHED_EVENT_FREQ   50

Definition at line 13 of file abtd_env.c.

◆ ABTD_SCHED_SLEEP_NSEC

#define ABTD_SCHED_SLEEP_NSEC   100

Definition at line 14 of file abtd_env.c.

◆ ABTD_THREAD_DEFAULT_STACKSIZE

#define ABTD_THREAD_DEFAULT_STACKSIZE   16384

Definition at line 11 of file abtd_env.c.

Function Documentation

◆ ABTD_env_init()

void ABTD_env_init ( ABTI_global p_global)

Definition at line 47 of file abtd_env.c.

Referenced by init_library().

◆ 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 305 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 316 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

Definition at line 327 of file abtd_env.c.

Referenced by ABTD_env_init().

◆ 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 343 of file abtd_env.c.

Referenced by ABTD_env_init().

◆ 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

Definition at line 396 of file abtd_env.c.

Referenced by ABTD_env_init().

◆ 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

Definition at line 360 of file abtd_env.c.

Referenced by ABTD_env_init().

◆ 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 378 of file abtd_env.c.

Referenced by ABTD_env_init().

◆ roundup_pow2_uint32()

static uint32_t roundup_pow2_uint32 ( uint32_t  val)
static

Definition at line 255 of file abtd_env.c.

Referenced by ABTD_env_init().