ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
Data Structures | Functions | Variables
pool.c File Reference
#include "abti.h"
Include dependency graph for pool.c:

Go to the source code of this file.

Data Structures

struct  pool_print_thread_to_unit_arg_t
 
struct  pool_print_unit_to_thread_arg_t
 

Functions

static ABTU_ret_err int pool_create (ABT_pool_access access, const ABTI_pool_required_def *p_required_def, const ABTI_pool_optional_def *p_optional_def, const ABTI_pool_deprecated_def *p_deprecated_def, const ABTI_pool_old_def *p_old_def, ABTI_pool_config *p_config, ABT_bool def_automatic, ABT_bool is_builtin, ABTI_pool **pp_newpool)
 
static void pool_create_def_from_old_def (const ABT_pool_def *p_def, ABTI_pool_old_def *p_old_def, ABTI_pool_required_def *p_required_def, ABTI_pool_optional_def *p_optional_def, ABTI_pool_deprecated_def *p_deprecated_def)
 
static int pool_pop_thread_ex (ABT_pool pool, ABT_thread *thread, ABT_pool_context pool_ctx)
 
static int pool_pop_threads_ex (ABT_pool pool, ABT_thread *threads, size_t len, size_t *num, ABT_pool_context pool_ctx)
 
static int pool_push_thread_ex (ABT_pool pool, ABT_thread thread, ABT_pool_context pool_ctx)
 
static int pool_push_threads_ex (ABT_pool pool, const ABT_thread *threads, size_t num, ABT_pool_context pool_ctx)
 
static int pool_pop_wait_thread_ex (ABT_pool pool, ABT_thread *thread, double time_secs, ABT_pool_context pool_ctx)
 
static void pool_print_thread_to_unit (void *arg, ABT_thread thread)
 
static void pool_print_unit_to_thread (void *arg, ABT_unit unit)
 
int ABT_pool_create (ABT_pool_user_def def, ABT_pool_config config, ABT_pool *newpool)
 Create a new pool. More...
 
int ABT_pool_create_basic (ABT_pool_kind kind, ABT_pool_access access, ABT_bool automatic, ABT_pool *newpool)
 Create a new pool from a predefined type. More...
 
int ABT_pool_free (ABT_pool *pool)
 Free a pool. More...
 
int ABT_pool_get_access (ABT_pool pool, ABT_pool_access *access)
 Get an access type of a pool. More...
 
int ABT_pool_is_empty (ABT_pool pool, ABT_bool *is_empty)
 Check if a pool is empty. More...
 
int ABT_pool_get_total_size (ABT_pool pool, size_t *size)
 Get the total size of a pool. More...
 
int ABT_pool_get_size (ABT_pool pool, size_t *size)
 Get the size of a pool. More...
 
int ABT_pool_pop_thread (ABT_pool pool, ABT_thread *thread)
 Pop a work unit from a pool. More...
 
int ABT_pool_pop_thread_ex (ABT_pool pool, ABT_thread *thread, ABT_pool_context pool_ctx)
 Pop a work unit from a pool. More...
 
int ABT_pool_pop_threads (ABT_pool pool, ABT_thread *threads, size_t len, size_t *num)
 Pop work units from a pool. More...
 
int ABT_pool_pop_threads_ex (ABT_pool pool, ABT_thread *threads, size_t len, size_t *num, ABT_pool_context pool_ctx)
 Pop work units from a pool. More...
 
int ABT_pool_push_thread (ABT_pool pool, ABT_thread thread)
 Push a work unit to a pool. More...
 
int ABT_pool_push_thread_ex (ABT_pool pool, ABT_thread thread, ABT_pool_context pool_ctx)
 Push a work unit to a pool. More...
 
int ABT_pool_push_threads (ABT_pool pool, const ABT_thread *threads, size_t num)
 Push work units to a pool. More...
 
int ABT_pool_push_threads_ex (ABT_pool pool, const ABT_thread *threads, size_t num, ABT_pool_context pool_ctx)
 Push work units to a pool. More...
 
int ABT_pool_pop_wait_thread (ABT_pool pool, ABT_thread *thread, double time_secs)
 Pop a work unit from a pool. More...
 
int ABT_pool_pop_wait_thread_ex (ABT_pool pool, ABT_thread *thread, double time_secs, ABT_pool_context pool_ctx)
 Pop a work unit from a pool. More...
 
int ABT_pool_print_all_threads (ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_thread))
 Apply a print function to every work unit in a pool. More...
 
int ABT_pool_pop (ABT_pool pool, ABT_unit *p_unit)
 Pop a work unit from a pool. More...
 
int ABT_pool_pop_wait (ABT_pool pool, ABT_unit *p_unit, double time_secs)
 Pop a unit from a pool with wait. More...
 
int ABT_pool_pop_timedwait (ABT_pool pool, ABT_unit *p_unit, double abstime_secs)
 Pop a unit from a pool with timed wait. More...
 
int ABT_pool_push (ABT_pool pool, ABT_unit unit)
 Push a unit to a pool. More...
 
int ABT_pool_remove (ABT_pool pool, ABT_unit unit)
 Remove a specified work unit from a pool. More...
 
int ABT_pool_print_all (ABT_pool pool, void *arg, void(*print_fn)(void *, ABT_unit))
 Apply a print function to every work unit in a pool using a user-defined function. More...
 
int ABT_pool_set_data (ABT_pool pool, void *data)
 Set user data in a pool. More...
 
int ABT_pool_get_data (ABT_pool pool, void **data)
 Retrieve user data from a pool. More...
 
int ABT_pool_add_sched (ABT_pool pool, ABT_sched sched)
 Create a new work unit associated with a scheduler and push it to a pool. More...
 
int ABT_pool_get_id (ABT_pool pool, int *id)
 Get ID of a pool. More...
 
static ABT_unit pool_create_unit_wrapper (ABT_pool pool, ABT_thread thread)
 
static void pool_free_unit_wrapper (ABT_pool pool, ABT_unit unit)
 
static ABT_bool pool_is_empty_wrapper (ABT_pool pool)
 
static ABT_thread pool_pop_wrapper (ABT_pool pool, ABT_pool_context context)
 
static void pool_push_wrapper (ABT_pool pool, ABT_unit unit, ABT_pool_context context)
 
static int pool_init_wrapper (ABT_pool pool, ABT_pool_config config)
 
static void pool_free_wrapper (ABT_pool pool)
 
static size_t pool_get_size_wrapper (ABT_pool pool)
 
static ABT_thread pool_pop_wait_wrapper (ABT_pool pool, double time_secs, ABT_pool_context context)
 
static void pool_pop_many_wrapper (ABT_pool pool, ABT_thread *threads, size_t max_threads, size_t *num_popped, ABT_pool_context context)
 
static void pool_push_many_wrapper (ABT_pool pool, const ABT_unit *units, size_t num_units, ABT_pool_context context)
 
static void pool_print_all_wrapper (ABT_pool pool, void *arg, void(*print_f)(void *, ABT_thread))
 
static uint64_t pool_get_new_id (void)
 

Variables

static ABTD_atomic_uint64 g_pool_id = ABTD_ATOMIC_UINT64_STATIC_INITIALIZER(0)
 

Function Documentation

◆ pool_create()

static ABTU_ret_err int pool_create ( ABT_pool_access  access,
const ABTI_pool_required_def *  p_required_def,
const ABTI_pool_optional_def *  p_optional_def,
const ABTI_pool_deprecated_def *  p_deprecated_def,
const ABTI_pool_old_def *  p_old_def,
ABTI_pool_config *  p_config,
ABT_bool  def_automatic,
ABT_bool  is_builtin,
ABTI_pool **  pp_newpool 
)
static

Definition at line 1685 of file pool.c.

◆ pool_create_def_from_old_def()

static void pool_create_def_from_old_def ( const ABT_pool_def p_def,
ABTI_pool_old_def *  p_old_def,
ABTI_pool_required_def *  p_required_def,
ABTI_pool_optional_def *  p_optional_def,
ABTI_pool_deprecated_def *  p_deprecated_def 
)
static

Definition at line 1636 of file pool.c.

◆ pool_create_unit_wrapper()

static ABT_unit pool_create_unit_wrapper ( ABT_pool  pool,
ABT_thread  thread 
)
static

Definition at line 1521 of file pool.c.

◆ pool_free_unit_wrapper()

static void pool_free_unit_wrapper ( ABT_pool  pool,
ABT_unit  unit 
)
static

Definition at line 1527 of file pool.c.

◆ pool_free_wrapper()

static void pool_free_wrapper ( ABT_pool  pool)
static

Definition at line 1568 of file pool.c.

◆ pool_get_new_id()

static uint64_t pool_get_new_id ( void  )
inlinestatic

Definition at line 1750 of file pool.c.

◆ pool_get_size_wrapper()

static size_t pool_get_size_wrapper ( ABT_pool  pool)
static

Definition at line 1574 of file pool.c.

◆ pool_init_wrapper()

static int pool_init_wrapper ( ABT_pool  pool,
ABT_pool_config  config 
)
static

Definition at line 1562 of file pool.c.

◆ pool_is_empty_wrapper()

static ABT_bool pool_is_empty_wrapper ( ABT_pool  pool)
static

Definition at line 1533 of file pool.c.

◆ pool_pop_many_wrapper()

static void pool_pop_many_wrapper ( ABT_pool  pool,
ABT_thread threads,
size_t  max_threads,
size_t *  num_popped,
ABT_pool_context  context 
)
static

Definition at line 1595 of file pool.c.

◆ pool_pop_thread_ex()

static int pool_pop_thread_ex ( ABT_pool  pool,
ABT_thread thread,
ABT_pool_context  pool_ctx 
)
inlinestatic

Definition at line 1755 of file pool.c.

Referenced by ABT_pool_pop_thread(), and ABT_pool_pop_thread_ex().

◆ pool_pop_threads_ex()

static int pool_pop_threads_ex ( ABT_pool  pool,
ABT_thread threads,
size_t  len,
size_t *  num,
ABT_pool_context  pool_ctx 
)
inlinestatic

Definition at line 1767 of file pool.c.

Referenced by ABT_pool_pop_threads(), and ABT_pool_pop_threads_ex().

◆ pool_pop_wait_thread_ex()

static int pool_pop_wait_thread_ex ( ABT_pool  pool,
ABT_thread thread,
double  time_secs,
ABT_pool_context  pool_ctx 
)
inlinestatic

Definition at line 1852 of file pool.c.

Referenced by ABT_pool_pop_wait_thread(), and ABT_pool_pop_wait_thread_ex().

◆ pool_pop_wait_wrapper()

static ABT_thread pool_pop_wait_wrapper ( ABT_pool  pool,
double  time_secs,
ABT_pool_context  context 
)
static

Definition at line 1580 of file pool.c.

◆ pool_pop_wrapper()

static ABT_thread pool_pop_wrapper ( ABT_pool  pool,
ABT_pool_context  context 
)
static

Definition at line 1540 of file pool.c.

◆ pool_print_all_wrapper()

static void pool_print_all_wrapper ( ABT_pool  pool,
void *  arg,
void(*)(void *, ABT_thread print_f 
)
static

Definition at line 1626 of file pool.c.

◆ pool_print_thread_to_unit()

static void pool_print_thread_to_unit ( void *  arg,
ABT_thread  thread 
)
static

Definition at line 1867 of file pool.c.

◆ pool_print_unit_to_thread()

static void pool_print_unit_to_thread ( void *  arg,
ABT_unit  unit 
)
static

Definition at line 1875 of file pool.c.

◆ pool_push_many_wrapper()

static void pool_push_many_wrapper ( ABT_pool  pool,
const ABT_unit units,
size_t  num_units,
ABT_pool_context  context 
)
static

Definition at line 1615 of file pool.c.

◆ pool_push_thread_ex()

static int pool_push_thread_ex ( ABT_pool  pool,
ABT_thread  thread,
ABT_pool_context  pool_ctx 
)
inlinestatic

Definition at line 1786 of file pool.c.

Referenced by ABT_pool_push_thread(), and ABT_pool_push_thread_ex().

◆ pool_push_threads_ex()

static int pool_push_threads_ex ( ABT_pool  pool,
const ABT_thread threads,
size_t  num,
ABT_pool_context  pool_ctx 
)
inlinestatic

Definition at line 1805 of file pool.c.

Referenced by ABT_pool_push_threads(), and ABT_pool_push_threads_ex().

◆ pool_push_wrapper()

static void pool_push_wrapper ( ABT_pool  pool,
ABT_unit  unit,
ABT_pool_context  context 
)
static

Definition at line 1554 of file pool.c.

Variable Documentation

◆ g_pool_id

ABTD_atomic_uint64 g_pool_id = ABTD_ATOMIC_UINT64_STATIC_INITIALIZER(0)
static

Definition at line 1511 of file pool.c.