|
int | ABT_pool_create (ABT_pool_def *def, ABT_pool_config config, ABT_pool *newpool) |
| Create a new pool and return its handle through newpool . 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 and return its handle through newpool . More...
|
|
int | ABT_pool_free (ABT_pool *pool) |
| Free the given pool, and modify its value to ABT_POOL_NULL. More...
|
|
int | ABT_pool_get_access (ABT_pool pool, ABT_pool_access *access) |
| Get the access type of target pool. More...
|
|
int | ABT_pool_get_total_size (ABT_pool pool, size_t *size) |
| Return the total size of a pool. More...
|
|
int | ABT_pool_get_size (ABT_pool pool, size_t *size) |
| Return the size of a pool. More...
|
|
int | ABT_pool_pop (ABT_pool pool, ABT_unit *p_unit) |
| Pop a unit from the target pool. More...
|
|
int | ABT_pool_push (ABT_pool pool, ABT_unit unit) |
| Push a unit to the target pool. More...
|
|
int | ABT_pool_remove (ABT_pool pool, ABT_unit unit) |
| Remove a specified unit from the target pool. More...
|
|
int | ABT_pool_print_all (ABT_pool pool, void *arg, void(*print_fn)(void *, ABT_unit)) |
| Apply a print function to every unit in a pool using a user-defined function. More...
|
|
int | ABT_pool_set_data (ABT_pool pool, void *data) |
| Set the specific data of the target user-defined pool. More...
|
|
int | ABT_pool_get_data (ABT_pool pool, void **data) |
| Retrieve the specific data of the target user-defined pool. More...
|
|
int | ABT_pool_add_sched (ABT_pool pool, ABT_sched sched) |
| Push a scheduler to a pool. More...
|
|
int | ABT_pool_get_id (ABT_pool pool, int *id) |
| Get the ID of the target pool. More...
|
|
This group is for Pool.
Push a scheduler to a pool.
By pushing a scheduler, the user can change the running scheduler: when the top scheduler (the running scheduler) will pick it from the pool and run it, it will become the new scheduler. This new scheduler will be in charge until it explicitly yields, except if ABT_sched_finish() or ABT_sched_exit() are called.
The scheduler should have been created by ABT_sched_create or ABT_sched_create_basic.
- Parameters
-
[in] | pool | handle to the pool |
[in] | sched | handle to the sched |
- Returns
- Error code
- Return values
-
Definition at line 433 of file pool.c.
int ABT_pool_print_all |
( |
ABT_pool |
pool, |
|
|
void * |
arg, |
|
|
void(*)(void *, ABT_unit) |
print_fn |
|
) |
| |
Apply a print function to every unit in a pool using a user-defined function.
This function applies print_fn
to every unit in pool
. As the name of the argument implies, print_fn
may not have any side effect; ABT_pool_print_all()
is for the purpose of debugging and profiling. For example, changing the state of ABT_unit
in print_fn
is forbidden.
When pool
does not support the print-all feature, ABT_ERR_POOL is returned.
- Parameters
-
[in] | pool | handle to the pool |
[in] | arg | argument passed to print_fn |
[in] | print_fn | user-defined print function |
- Returns
- Error code
- Return values
-
Definition at line 336 of file pool.c.