ARGOBOTS  1227c643f7a7f974f1f1778a9ffebd29d7dafecf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
pool.c
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  * See COPYRIGHT in top-level directory.
4  */
5 
6 #include "abti.h"
7 
9  ABT_bool automatic, ABTI_pool **pp_newpool);
10 
32  ABT_pool *newpool)
33 {
34  int abt_errno = ABT_SUCCESS;
35  ABTI_pool *p_newpool;
36 
37  abt_errno = pool_create(def, config, ABT_FALSE, &p_newpool);
38  ABTI_CHECK_ERROR(abt_errno);
39  *newpool = ABTI_pool_get_handle(p_newpool);
40 
41 fn_exit:
42  return abt_errno;
43 
44 fn_fail:
45  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
46  goto fn_exit;
47 }
48 
64  ABT_bool automatic, ABT_pool *newpool)
65 {
66  int abt_errno = ABT_SUCCESS;
67  ABTI_pool *p_newpool;
68  abt_errno = ABTI_pool_create_basic(kind, access, automatic, &p_newpool);
69  ABTI_CHECK_ERROR(abt_errno);
70  *newpool = ABTI_pool_get_handle(p_newpool);
71 
72 fn_exit:
73  return abt_errno;
74 
75 fn_fail:
76  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
77  goto fn_exit;
78 }
79 
89 {
90  int abt_errno = ABT_SUCCESS;
91 
92  ABT_pool h_pool = *pool;
93  ABTI_pool *p_pool = ABTI_pool_get_ptr(h_pool);
94 
95  ABTI_CHECK_TRUE(p_pool != NULL && h_pool != ABT_POOL_NULL,
97  ABTI_pool_free(p_pool);
98 
99  *pool = ABT_POOL_NULL;
100 
101 fn_exit:
102  return abt_errno;
103 
104 fn_fail:
105  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
106  goto fn_exit;
107 }
108 
119 {
120  int abt_errno = ABT_SUCCESS;
121  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
122  ABTI_CHECK_NULL_POOL_PTR(p_pool);
123 
124  *access = p_pool->access;
125 
126 fn_exit:
127  return abt_errno;
128 
129 fn_fail:
130  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
131  goto fn_exit;
132 }
133 
147 int ABT_pool_get_total_size(ABT_pool pool, size_t *size)
148 {
149  int abt_errno = ABT_SUCCESS;
150 
151  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
152  ABTI_CHECK_NULL_POOL_PTR(p_pool);
153 
154  *size = ABTI_pool_get_total_size(p_pool);
155 
156 fn_exit:
157  return abt_errno;
158 
159 fn_fail:
160  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
161  goto fn_exit;
162 }
163 
176 int ABT_pool_get_size(ABT_pool pool, size_t *size)
177 {
178  int abt_errno = ABT_SUCCESS;
179 
180  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
181  ABTI_CHECK_NULL_POOL_PTR(p_pool);
182 
183  *size = ABTI_pool_get_size(p_pool);
184 
185 fn_exit:
186  return abt_errno;
187 
188 fn_fail:
189  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
190  goto fn_exit;
191 }
192 
202 int ABT_pool_pop(ABT_pool pool, ABT_unit *p_unit)
203 {
204  int abt_errno = ABT_SUCCESS;
205 
206  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
207  ABTI_CHECK_NULL_POOL_PTR(p_pool);
208 
209  *p_unit = ABTI_pool_pop(p_pool);
210 
211 fn_exit:
212  return abt_errno;
213 
214 fn_fail:
215  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
216  goto fn_exit;
217 }
218 
239 int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *p_unit, double time_secs)
240 {
241  int abt_errno = ABT_SUCCESS;
242 
243  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
244  ABTI_CHECK_NULL_POOL_PTR(p_pool);
245 
246  *p_unit = ABTI_pool_pop_wait(p_pool, time_secs);
247 
248 fn_exit:
249  return abt_errno;
250 
251 fn_fail:
252  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
253  goto fn_exit;
254 }
255 
256 int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *p_unit, double abstime_secs)
257 {
258  int abt_errno = ABT_SUCCESS;
259 
260  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
261  ABTI_CHECK_NULL_POOL_PTR(p_pool);
262 
263  *p_unit = ABTI_pool_pop_timedwait(p_pool, abstime_secs);
264 
265 fn_exit:
266  return abt_errno;
267 
268 fn_fail:
269  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
270  goto fn_exit;
271 }
272 
283 {
284  int abt_errno = ABT_SUCCESS;
285 
286  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
287  ABTI_CHECK_NULL_POOL_PTR(p_pool);
288 
290 
291  /* Save the producer ES information in the pool */
292  ABTI_pool_push(p_pool, unit);
293 
294 fn_exit:
295  return abt_errno;
296 
297 fn_fail:
298  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
299  goto fn_exit;
300 }
301 
312 {
313  int abt_errno = ABT_SUCCESS;
314 
315  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
316  ABTI_CHECK_NULL_POOL_PTR(p_pool);
317 
318  abt_errno = ABTI_pool_remove(p_pool, unit);
319  ABTI_CHECK_ERROR(abt_errno);
320 
321 fn_exit:
322  return abt_errno;
323 
324 fn_fail:
325  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
326  goto fn_exit;
327 }
328 
348 int ABT_pool_print_all(ABT_pool pool, void *arg,
349  void (*print_fn)(void *, ABT_unit))
350 {
351  int abt_errno = ABT_SUCCESS;
352  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
353  ABTI_CHECK_NULL_POOL_PTR(p_pool);
354  if (!p_pool->p_print_all) {
355  abt_errno = ABT_ERR_POOL;
356  goto fn_fail;
357  }
358 
359  p_pool->p_print_all(pool, arg, print_fn);
360 
361 fn_exit:
362  return abt_errno;
363 
364 fn_fail:
365  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
366  goto fn_exit;
367 }
368 
382 {
383  int abt_errno = ABT_SUCCESS;
384 
385  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
386  ABTI_CHECK_NULL_POOL_PTR(p_pool);
387 
388  p_pool->data = data;
389 
390 fn_exit:
391  return abt_errno;
392 
393 fn_fail:
394  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
395  goto fn_exit;
396 }
397 
410 int ABT_pool_get_data(ABT_pool pool, void **data)
411 {
412  int abt_errno = ABT_SUCCESS;
413 
414  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
415  ABTI_CHECK_NULL_POOL_PTR(p_pool);
416 
417  *data = p_pool->data;
418 
419 fn_exit:
420  return abt_errno;
421 
422 fn_fail:
423  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
424  goto fn_exit;
425 }
426 
446 {
447  int abt_errno = ABT_SUCCESS;
448  ABTI_local *p_local = ABTI_local_get_local();
449 
450  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
451  ABTI_CHECK_NULL_POOL_PTR(p_pool);
452 
453  ABTI_sched *p_sched = ABTI_sched_get_ptr(sched);
454  ABTI_CHECK_NULL_SCHED_PTR(p_sched);
455 
456  /* Mark the scheduler as it is used in pool */
458  p_sched->used = ABTI_SCHED_IN_POOL;
459 
460  /* In both ABT_SCHED_TYPE_ULT and ABT_SCHED_TYPE_TASK cases, we use ULT-type
461  * scheduler to reduce the code maintenance cost. ABT_SCHED_TYPE_TASK
462  * should be removed in the future. */
463  abt_errno = ABTI_ythread_create_sched(p_local, p_pool, p_sched);
464  ABTI_CHECK_ERROR(abt_errno);
465 
466 fn_exit:
467  return abt_errno;
468 
469 fn_fail:
470  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
471  goto fn_exit;
472 }
473 
485 int ABT_pool_get_id(ABT_pool pool, int *id)
486 {
487  int abt_errno = ABT_SUCCESS;
488 
489  ABTI_pool *p_pool = ABTI_pool_get_ptr(pool);
490  ABTI_CHECK_NULL_POOL_PTR(p_pool);
491 
492  *id = (int)p_pool->id;
493 
494 fn_exit:
495  return abt_errno;
496 
497 fn_fail:
498  HANDLE_ERROR_FUNC_WITH_CODE(abt_errno);
499  goto fn_exit;
500 }
501 
502 /*****************************************************************************/
503 /* Private APIs */
504 /*****************************************************************************/
505 
507  ABT_pool_access access,
508  ABT_bool automatic,
509  ABTI_pool **pp_newpool)
510 {
511  int abt_errno;
512  ABT_pool_def def;
513 
514  switch (kind) {
515  case ABT_POOL_FIFO:
516  abt_errno = ABTI_pool_get_fifo_def(access, &def);
517  break;
518  case ABT_POOL_FIFO_WAIT:
519  abt_errno = ABTI_pool_get_fifo_wait_def(access, &def);
520  break;
521  default:
522  abt_errno = ABT_ERR_INV_POOL_KIND;
523  break;
524  }
525  ABTI_CHECK_ERROR_RET(abt_errno);
526 
527  abt_errno = pool_create(&def, ABT_POOL_CONFIG_NULL, automatic, pp_newpool);
528  ABTI_CHECK_ERROR_RET(abt_errno);
529  return ABT_SUCCESS;
530 }
531 
533 {
534  LOG_DEBUG("[P%" PRIu64 "] freed\n", p_pool->id);
535  ABT_pool h_pool = ABTI_pool_get_handle(p_pool);
536  p_pool->p_free(h_pool);
537  ABTU_free(p_pool);
538 }
539 
540 void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent)
541 {
542  if (p_pool == NULL) {
543  fprintf(p_os, "%*s== NULL POOL ==\n", indent, "");
544  } else {
545  char *access;
546 
547  switch (p_pool->access) {
549  access = "PRIV";
550  break;
552  access = "SPSC";
553  break;
555  access = "MPSC";
556  break;
558  access = "SPMC";
559  break;
561  access = "MPMC";
562  break;
563  default:
564  access = "UNKNOWN";
565  break;
566  }
567 
568  fprintf(p_os,
569  "%*s== POOL (%p) ==\n"
570  "%*sid : %" PRIu64 "\n"
571  "%*saccess : %s\n"
572  "%*sautomatic : %s\n"
573  "%*snum_scheds : %d\n"
574  "%*ssize : %zu\n"
575  "%*snum_blocked : %d\n"
576  "%*snum_migrations: %d\n"
577  "%*sdata : %p\n",
578  indent, "", (void *)p_pool, indent, "", p_pool->id, indent, "",
579  access, indent, "",
580  (p_pool->automatic == ABT_TRUE) ? "TRUE" : "FALSE", indent, "",
581  ABTD_atomic_acquire_load_int32(&p_pool->num_scheds), indent, "",
582  ABTI_pool_get_size(p_pool), indent, "",
585  indent, "", p_pool->data);
586  }
587  fflush(p_os);
588 }
589 
592 {
593  ABTD_atomic_release_store_uint64(&g_pool_id, 0);
594 }
595 
596 /*****************************************************************************/
597 /* Internal static functions */
598 /*****************************************************************************/
599 
600 static inline uint64_t pool_get_new_id(void);
602  ABT_bool automatic, ABTI_pool **pp_newpool)
603 {
604  int abt_errno;
605  ABTI_pool *p_pool;
606  abt_errno = ABTU_malloc(sizeof(ABTI_pool), (void **)&p_pool);
607  ABTI_CHECK_ERROR_RET(abt_errno);
608 
609  p_pool->access = def->access;
610  p_pool->automatic = automatic;
614  p_pool->data = NULL;
615 
616  /* Set up the pool functions from def */
617  p_pool->u_get_type = def->u_get_type;
618  p_pool->u_get_thread = def->u_get_thread;
619  p_pool->u_get_task = def->u_get_task;
620  p_pool->u_is_in_pool = def->u_is_in_pool;
622  p_pool->u_create_from_task = def->u_create_from_task;
623  p_pool->u_free = def->u_free;
624  p_pool->p_init = def->p_init;
625  p_pool->p_get_size = def->p_get_size;
626  p_pool->p_push = def->p_push;
627  p_pool->p_pop = def->p_pop;
628  p_pool->p_pop_wait = def->p_pop_wait;
629  p_pool->p_pop_timedwait = def->p_pop_timedwait;
630  p_pool->p_remove = def->p_remove;
631  p_pool->p_free = def->p_free;
632  p_pool->p_print_all = def->p_print_all;
633  p_pool->id = pool_get_new_id();
634  LOG_DEBUG("[P%" PRIu64 "] created\n", p_pool->id);
635 
636  /* Configure the pool */
637  if (p_pool->p_init) {
638  abt_errno = p_pool->p_init(ABTI_pool_get_handle(p_pool), config);
639  if (abt_errno != ABT_SUCCESS) {
640  ABTU_free(p_pool);
641  return abt_errno;
642  }
643  }
644  *pp_newpool = p_pool;
645  return ABT_SUCCESS;
646 }
647 
648 static inline uint64_t pool_get_new_id(void)
649 {
650  return (uint64_t)ABTD_atomic_fetch_add_uint64(&g_pool_id, 1);
651 }
ABTD_atomic_int32 num_scheds
Definition: abti.h:285
ABT_pool_print_all_fn p_print_all
Definition: abti.h:309
static ABTD_atomic_uint64 g_pool_id
Definition: pool.c:590
struct ABT_unit_opaque * ABT_unit
Definition: abt.h:337
ABT_bool automatic
Definition: abti.h:283
int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC
Pop a unit from the target pool.
Definition: pool.c:202
#define ABTI_CHECK_NULL_SCHED_PTR(p)
Definition: abti_error.h:182
static ABT_pool ABTI_pool_get_handle(ABTI_pool *p_pool)
Definition: abti_pool.h:26
ABT_unit_get_task_fn u_get_task
Definition: abt.h:494
static int32_t ABTD_atomic_acquire_load_int32(const ABTD_atomic_int32 *ptr)
Definition: abtd_atomic.h:780
#define ABT_POOL_NULL
Definition: abt.h:413
ABT_unit_get_type_fn u_get_type
Definition: abti.h:292
static ABT_unit ABTI_pool_pop(ABTI_pool *p_pool)
Definition: abti_pool.h:108
ABT_pool_init_fn p_init
Definition: abt.h:501
ABT_unit_create_from_thread_fn u_create_from_thread
Definition: abti.h:296
static void ABTD_atomic_release_store_uint64(ABTD_atomic_uint64 *ptr, uint64_t val)
Definition: abtd_atomic.h:971
#define ABTD_ATOMIC_UINT64_STATIC_INITIALIZER(val)
Definition: abtd_atomic.h:59
struct ABT_sched_opaque * ABT_sched
Definition: abt.h:319
ABT_pool_pop_timedwait_fn p_pop_timedwait
Definition: abti.h:306
void ABTI_pool_free(ABTI_pool *p_pool)
Definition: pool.c:532
int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Return the size of a pool.
Definition: pool.c:176
static ABTU_ret_err int pool_create(ABT_pool_def *def, ABT_pool_config config, ABT_bool automatic, ABTI_pool **pp_newpool)
Definition: pool.c:601
struct ABTI_local ABTI_local
Definition: abti.h:101
#define ABT_ERR_INV_POOL
Definition: abt.h:76
#define ABT_UNIT_NULL
Definition: abt.h:415
ABTU_ret_err int ABTI_ythread_create_sched(ABTI_local *p_local, ABTI_pool *p_pool, ABTI_sched *p_sched)
Definition: thread.c:1699
static ABT_unit ABTI_pool_pop_timedwait(ABTI_pool *p_pool, double abstime_secs)
Definition: abti_pool.h:97
int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC
Pop a unit from the target pool with wait.
Definition: pool.c:239
ABTU_ret_err int ABTI_pool_get_fifo_wait_def(ABT_pool_access access, ABT_pool_def *p_def)
Definition: fifo_wait.c:42
static ABT_unit ABTI_pool_pop_wait(ABTI_pool *p_pool, double time_secs)
Definition: abti_pool.h:87
int ABT_bool
Definition: abt.h:373
ABT_unit_get_thread_fn u_get_thread
Definition: abt.h:493
#define ABTI_CHECK_TRUE(cond, val)
Definition: abti_error.h:111
ABT_pool_pop_fn p_pop
Definition: abt.h:504
ABT_pool_access access
Definition: abt.h:489
ABT_pool_push_fn p_push
Definition: abti.h:303
ABT_unit_get_task_fn u_get_task
Definition: abti.h:294
struct ABT_pool_opaque * ABT_pool
Definition: abt.h:329
ABT_unit_is_in_pool_fn u_is_in_pool
Definition: abt.h:495
ABT_pool_push_fn p_push
Definition: abt.h:503
ABT_unit_get_thread_fn u_get_thread
Definition: abti.h:293
static uint64_t ABTD_atomic_fetch_add_uint64(ABTD_atomic_uint64 *ptr, uint64_t v)
Definition: abtd_atomic.h:411
ABT_pool_get_size_fn p_get_size
Definition: abti.h:302
ABT_unit_create_from_task_fn u_create_from_task
Definition: abti.h:297
ABT_unit_is_in_pool_fn u_is_in_pool
Definition: abti.h:295
int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC
Retrieve the specific data of the target user-defined pool.
Definition: pool.c:410
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
Definition: abtu.h:142
ABT_pool_pop_wait_fn p_pop_wait
Definition: abti.h:305
#define ABT_FALSE
Definition: abt.h:285
int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC
Get the ID of the target pool.
Definition: pool.c:485
ABT_pool_remove_fn p_remove
Definition: abti.h:307
ABT_pool_pop_fn p_pop
Definition: abti.h:304
#define HANDLE_ERROR_FUNC_WITH_CODE(n)
Definition: abti_error.h:353
static ABTI_pool * ABTI_pool_get_ptr(ABT_pool pool)
Definition: abti_pool.h:11
int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC
Set the specific data of the target user-defined pool.
Definition: pool.c:381
ABT_pool_free_fn p_free
Definition: abt.h:510
static ABTU_ret_err int ABTI_pool_remove(ABTI_pool *p_pool, ABT_unit unit)
Definition: abti_pool.h:80
ABT_unit_free_fn u_free
Definition: abti.h:298
#define ABT_ERR_INV_POOL_KIND
Definition: abt.h:77
int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC
Free the given pool, and modify its value to ABT_POOL_NULL.
Definition: pool.c:88
int ABT_pool_print_all(ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC
ABT_pool_init_fn p_init
Definition: abti.h:301
void * data
Definition: abti.h:288
#define ABT_SUCCESS
Definition: abt.h:64
ABT_unit_free_fn u_free
Definition: abt.h:498
ABT_pool_access
Definition: abt.h:161
#define ABT_TRUE
Definition: abt.h:284
static uint64_t pool_get_new_id(void)
Definition: pool.c:648
int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Remove a specified unit from the target pool.
Definition: pool.c:311
int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs) ABT_DEPRECATED ABT_API_PUBLIC
Definition: pool.c:256
int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Push a unit to the target pool.
Definition: pool.c:282
ABT_pool_access access
Definition: abti.h:282
int ABT_pool_add_sched(ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC
Push a scheduler to a pool.
Definition: pool.c:445
ABT_pool_kind
Definition: abt.h:156
ABT_unit_create_from_task_fn u_create_from_task
Definition: abt.h:497
void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent)
Definition: pool.c:540
int ABT_pool_get_access(ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC
Get the access type of target pool.
Definition: pool.c:118
int ABT_pool_create_basic(ABT_pool_kind kind, ABT_pool_access access, ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool from a predefined type and return its handle through newpool.
Definition: pool.c:63
static void ABTI_pool_push(ABTI_pool *p_pool, ABT_unit unit)
Definition: abti_pool.h:65
#define ABTI_CHECK_NULL_POOL_PTR(p)
Definition: abti_error.h:173
ABTU_ret_err int ABTI_pool_get_fifo_def(ABT_pool_access access, ABT_pool_def *p_def)
Definition: fifo.c:47
ABTU_ret_err int ABTI_pool_create_basic(ABT_pool_kind kind, ABT_pool_access access, ABT_bool automatic, ABTI_pool **pp_newpool)
Definition: pool.c:506
static ABTI_sched * ABTI_sched_get_ptr(ABT_sched sched)
Definition: abti_sched.h:11
int ABT_pool_create(ABT_pool_def *def, ABT_pool_config config, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool and return its handle through newpool.
Definition: pool.c:31
#define LOG_DEBUG(fmt,...)
Definition: abti_log.h:26
ABT_unit_create_from_thread_fn u_create_from_thread
Definition: abt.h:496
ABT_pool_free_fn p_free
Definition: abti.h:308
#define ABTI_CHECK_ERROR(abt_errno)
Definition: abti_error.h:86
uint64_t id
Definition: abti.h:289
ABTD_atomic_int32 num_migrations
Definition: abti.h:287
#define ABT_ERR_UNIT
Definition: abt.h:100
#define ABT_ERR_INV_SCHED
Definition: abt.h:71
struct ABT_pool_config_opaque * ABT_pool_config
Definition: abt.h:331
ABTI_sched_used used
Definition: abti.h:260
ABT_unit_get_type_fn u_get_type
Definition: abt.h:492
ABT_pool_get_size_fn p_get_size
Definition: abt.h:502
void ABTI_pool_reset_id(void)
Definition: pool.c:591
ABT_pool_pop_wait_fn p_pop_wait
Definition: abt.h:505
static void ABTD_atomic_release_store_int32(ABTD_atomic_int32 *ptr, int32_t val)
Definition: abtd_atomic.h:935
static size_t ABTI_pool_get_total_size(ABTI_pool *p_pool)
Definition: abti_pool.h:138
int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Return the total size of a pool.
Definition: pool.c:147
static ABTI_local * ABTI_local_get_local(void)
Definition: abti_local.h:41
static void ABTU_free(void *ptr)
Definition: abtu.h:135
ABT_pool_remove_fn p_remove
Definition: abt.h:509
#define ABT_POOL_CONFIG_NULL
Definition: abt.h:414
#define ABTI_CHECK_ERROR_RET(abt_errno)
Definition: abti_error.h:103
ABT_pool_print_all_fn p_print_all
Definition: abt.h:511
#define ABT_ERR_POOL
Definition: abt.h:99
ABT_pool_pop_timedwait_fn p_pop_timedwait
Definition: abt.h:506
Definition: fifo.c:33
#define ABTU_ret_err
Definition: abtu.h:49
static size_t ABTI_pool_get_size(ABTI_pool *p_pool)
Definition: abti_pool.h:133
ABTD_atomic_int32 num_blocked
Definition: abti.h:286