ARGOBOTS  4dc37e16e1b227a480715ab67dae1dcfb4d2d4e0
abti.h
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 #ifndef ABTI_H_INCLUDED
7 #define ABTI_H_INCLUDED
8 
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <stdint.h>
12 #include <inttypes.h>
13 #include <string.h>
14 #include <limits.h>
15 
16 #include "abt_config.h"
17 #include "abt.h"
18 
19 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
20 #define ABTI_IS_ERROR_CHECK_ENABLED 1
21 #else
22 #define ABTI_IS_ERROR_CHECK_ENABLED 0
23 #endif
24 
25 #ifdef ABT_CONFIG_DISABLE_EXT_THREAD
26 #define ABTI_IS_EXT_THREAD_ENABLED 0
27 #else
28 #define ABTI_IS_EXT_THREAD_ENABLED 1
29 #endif
30 
31 #ifdef ABT_CONFIG_DISABLE_UB_ASSERT
32 #define ABTI_IS_UB_ASSERT_ENABLED 0
33 #else
34 #define ABTI_IS_UB_ASSERT_ENABLED 1
35 #endif
36 
37 #include "abtu.h"
38 #include "abti_error.h"
39 #include "abti_valgrind.h"
40 
41 /* Constants */
42 #define ABTI_SCHED_NUM_PRIO 3
43 
44 #define ABTI_SCHED_REQ_FINISH (1 << 0)
45 #define ABTI_SCHED_REQ_EXIT (1 << 1)
46 #define ABTI_SCHED_REQ_REPLACE (1 << 2)
47 
48 #define ABTI_THREAD_REQ_JOIN (1 << 0)
49 #define ABTI_THREAD_REQ_CANCEL (1 << 1)
50 #define ABTI_THREAD_REQ_MIGRATE (1 << 2)
51 
52 #define ABTI_THREAD_INIT_ID 0xFFFFFFFFFFFFFFFF
53 #define ABTI_TASK_INIT_ID 0xFFFFFFFFFFFFFFFF
54 
55 #define ABTI_INDENT 4
56 
57 #define ABTI_UNIT_HASH_TABLE_SIZE_EXP 8 /* N -> 2^N table entries */
58 #define ABTI_UNIT_HASH_TABLE_SIZE ((size_t)(1 << ABTI_UNIT_HASH_TABLE_SIZE_EXP))
59 
60 #define ABTI_STACK_CHECK_TYPE_NONE 0
61 #define ABTI_STACK_CHECK_TYPE_CANARY 1
62 #define ABTI_STACK_CHECK_TYPE_MPROTECT 2
63 #define ABTI_STACK_CHECK_TYPE_MPROTECT_STRICT 3
64 
68 };
69 
74 };
75 
80 };
81 
82 #define ABTI_THREAD_TYPE_EXT ((ABTI_thread_type)0)
83 #define ABTI_THREAD_TYPE_THREAD ((ABTI_thread_type)(0x1 << 0))
84 #define ABTI_THREAD_TYPE_ROOT ((ABTI_thread_type)(0x1 << 1))
85 #define ABTI_THREAD_TYPE_PRIMARY ((ABTI_thread_type)(0x1 << 2))
86 #define ABTI_THREAD_TYPE_MAIN_SCHED ((ABTI_thread_type)(0x1 << 3))
87 #define ABTI_THREAD_TYPE_YIELDABLE ((ABTI_thread_type)(0x1 << 4))
88 #define ABTI_THREAD_TYPE_NAMED ((ABTI_thread_type)(0x1 << 5))
89 #define ABTI_THREAD_TYPE_MIGRATABLE ((ABTI_thread_type)(0x1 << 6))
90 
91 /* Memory management. Only one flag must be set. */
92 /* Only a thread descriptor is allocated. It is from a memory pool.
93  * This thread does not have a ULT stack allocated by the Argobots runtime. */
94 #define ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC ((ABTI_thread_type)(0x1 << 7))
95 /* Only a thread descriptor is allocated. It is allocated by malloc().
96  * This thread does not have a ULT stack allocated by the Argobots runtime. */
97 #define ABTI_THREAD_TYPE_MEM_MALLOC_DESC ((ABTI_thread_type)(0x1 << 8))
98 /* Both a thread descriptor and a ULT stack are allocated together from a memory
99  * pool. */
100 #define ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC_STACK ((ABTI_thread_type)(0x1 << 9))
101 /* Both a thread descriptor and a ULT stack are allocated together by malloc().
102  */
103 #define ABTI_THREAD_TYPE_MEM_MALLOC_DESC_STACK ((ABTI_thread_type)(0x1 << 10))
104 /* Both a thread descriptor and a ULT stack are allocated separately. A memory
105  * pool is used for a descriptor. A ULT stack is lazily allocated from a
106  * memory pool (so p_stack can be NULL). */
107 #define ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC_MEMPOOL_LAZY_STACK \
108  ((ABTI_thread_type)(0x1 << 11))
109 /* Both a thread descriptor and a ULT stack are allocated separately. A memory
110  * pool is used for a descriptor. A ULT stack is lazily allocated from a
111  * memory pool (so p_stack can be NULL). */
112 #define ABTI_THREAD_TYPE_MEM_MALLOC_DESC_MEMPOOL_LAZY_STACK \
113  ((ABTI_thread_type)(0x1 << 12))
114 
115 #define ABTI_THREAD_TYPES_MEM \
116  (ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC | ABTI_THREAD_TYPE_MEM_MALLOC_DESC | \
117  ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC_STACK | \
118  ABTI_THREAD_TYPE_MEM_MALLOC_DESC_STACK | \
119  ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC_MEMPOOL_LAZY_STACK | \
120  ABTI_THREAD_TYPE_MEM_MALLOC_DESC_MEMPOOL_LAZY_STACK)
121 
122 /* ABTI_MUTEX_ATTR_NONE must be 0. See ABT_MUTEX_INITIALIZER. */
123 #define ABTI_MUTEX_ATTR_NONE 0
124 /* ABTI_MUTEX_ATTR_RECURSIVE must be 1. See ABT_RECURSIVE_MUTEX_INITIALIZER. */
125 #define ABTI_MUTEX_ATTR_RECURSIVE 1
126 
127 /* Macro functions */
128 #define ABTI_UNUSED(a) (void)(a)
129 
130 /* Data Types */
131 typedef struct ABTI_global ABTI_global;
132 typedef struct ABTI_local ABTI_local;
134 typedef struct ABTI_xstream ABTI_xstream;
136 typedef struct ABTI_sched ABTI_sched;
139 typedef void *ABTI_sched_id; /* Scheduler id */
140 typedef uintptr_t ABTI_sched_kind; /* Scheduler kind */
141 typedef struct ABTI_pool ABTI_pool;
148 typedef struct ABTI_thread ABTI_thread;
150 typedef struct ABTI_ythread ABTI_ythread;
152 typedef uint32_t ABTI_thread_type;
153 typedef struct ABTI_key ABTI_key;
154 typedef struct ABTI_ktelem ABTI_ktelem;
155 typedef struct ABTI_ktable ABTI_ktable;
158 typedef struct ABTI_mutex ABTI_mutex;
159 typedef struct ABTI_cond ABTI_cond;
160 typedef struct ABTI_rwlock ABTI_rwlock;
162 typedef struct ABTI_future ABTI_future;
163 typedef struct ABTI_barrier ABTI_barrier;
165 typedef struct ABTI_timer ABTI_timer;
166 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
167 typedef struct ABTI_tool_context ABTI_tool_context;
168 #endif
169 /* ID associated with native thread (e.g, Pthreads), which can distinguish
170  * execution streams and external threads */
171 struct ABTI_native_thread_id_opaque;
172 typedef struct ABTI_native_thread_id_opaque *ABTI_native_thread_id;
173 /* ID associated with thread (i.e., ULTs, tasklets, and external threads) */
174 struct ABTI_thread_id_opaque;
175 typedef struct ABTI_thread_id_opaque *ABTI_thread_id;
176 /* Unit-to-thread hash table. */
180 
181 /* Architecture-Dependent Definitions */
182 #include "abtd.h"
183 
184 /* Basic data structure and memory pool. */
185 #include "abti_sync_lifo.h"
186 #include "abti_mem_pool.h"
187 
188 /* Definitions */
190 #ifndef ABT_CONFIG_ACTIVE_WAIT_POLICY
192 #endif
195 };
196 
198  int attrs; /* bit-or'ed attributes */
199 };
200 
201 struct ABTI_mutex {
202  int attrs; /* attributes copied from ABTI_mutex_attr. Check
203  * ABT_(RECURSIVE_)MUTEX_INITIALIZER to see how
204  * this variable can be initialized. */
205  ABTD_spinlock lock; /* lock */
206  int nesting_cnt; /* nesting count (if recursive) */
207  ABTI_thread_id owner_id; /* owner's ID (if recursive) */
208 #ifndef ABT_CONFIG_USE_SIMPLE_MUTEX
210  ABTI_waitlist waitlist; /* waiting list */
211 #endif
212 };
213 
216 };
217 
220  ABTD_spinlock lock; /* Protecting any list update. */
221 };
222 
223 struct ABTI_global {
224  int max_xstreams; /* Largest rank used in Argobots. */
225  int num_xstreams; /* Current # of ESs */
226  ABTI_xstream *p_xstream_head; /* List of ESs (head). The list is sorted. */
228  xstream_list_lock; /* Spinlock protecting ES list. Any read and
229  * write to this list requires a lock.*/
230 
231  int num_cores; /* Number of CPU cores */
232  ABT_bool set_affinity; /* Whether CPU affinity is used */
233  ABT_bool use_logging; /* Whether logging is used */
234  ABT_bool use_debug; /* Whether debug output is used */
235  ABT_bool print_raw_stack; /* Print raw stack or not. */
236  uint32_t key_table_size; /* Default key table size */
237  size_t thread_stacksize; /* Default stack size for ULT (in bytes) */
238  size_t sched_stacksize; /* Default stack size for sched (in bytes) */
239  uint32_t sched_event_freq; /* Default check frequency for sched */
240  uint64_t sched_sleep_nsec; /* Default nanoseconds for scheduler sleep */
241  ABTI_ythread *p_primary_ythread; /* Primary ULT */
242 
243  uint32_t
244  mutex_max_handovers; /* Default max. # of local handovers (unused) */
245  uint32_t mutex_max_wakeups; /* Default max. # of wakeups (unused) */
246  size_t sys_page_size; /* System page size (typically, 4KB) */
247  size_t huge_page_size; /* Huge page size */
248 #ifdef ABT_CONFIG_USE_MEM_POOL
249  size_t mem_page_size; /* Page size for memory allocation */
250  size_t mem_sp_size; /* Stack page size */
251  uint32_t mem_max_stacks; /* Max. # of stacks kept in each ES */
252  uint32_t mem_max_descs; /* Max. # of descriptors kept in each ES */
253  int mem_lp_alloc; /* How to allocate large pages */
254 
255  ABTI_mem_pool_global_pool mem_pool_stack; /* Pool of stack (default size) */
256  ABTI_mem_pool_global_pool mem_pool_desc; /* Pool of descriptors that can
257  * store ABTI_task. */
258 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
259  /* They are used for external threads. */
264 #endif
265 #endif
266  ABTI_stack_guard stack_guard_kind; /* Stack guard type. */
267 
268  ABT_bool print_config; /* Whether to print config on ABT_init */
269 
270 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
271  ABTD_spinlock tool_writer_lock;
272 
273  ABT_tool_thread_callback_fn tool_thread_cb_f;
274  void *tool_thread_user_arg;
275  ABTD_atomic_uint64 tool_thread_event_mask_tagged;
276 #endif
277 
280  maps ABT_unit to
281  ABTI_thread */
282 };
283 
284 struct ABTI_local; /* Empty. */
285 
288  ABTI_local *(*get_local_f)(void);
290  void *(*get_local_ptr_f)(void);
292 };
293 
294 struct ABTI_xstream {
295  /* Linked list to manage all execution streams. */
298 
299  int rank; /* Rank */
301  ABTD_atomic_int state; /* State (ABT_xstream_state) */
302  ABTI_sched *p_main_sched; /* Main scheduler, which is the bottom of the
303  * linked list of schedulers */
304  ABTD_xstream_context ctx; /* ES context */
305 
307  *p_root_ythread; /* Root thread that schedulers the main scheduler. */
308  ABTI_pool *p_root_pool; /* Root pool that stores the main scheduler. */
309 
311  ABTI_thread *p_thread; /* Current running ULT/tasklet */
312 
313 #ifdef ABT_CONFIG_USE_MEM_POOL
316 #endif
317 };
318 
319 struct ABTI_sched {
320  ABTI_sched_used used; /* To know if it is used and how */
321  ABT_bool automatic; /* To know if automatic data free */
322  ABTI_sched_kind kind; /* Kind of the scheduler */
323  ABT_sched_type type; /* Can yield or not (ULT or task) */
324  ABTI_sched *p_replace_sched; /* Main scheduler that should replace this.
325  * ABTI_SCHED_REQ_REPLACE should be set. */
326  ABTI_ythread *p_replace_waiter; /* Thread waiting for replacement. */
328  ABT_pool *pools; /* Thread pools */
329  size_t num_pools; /* Number of thread pools */
330  ABTI_ythread *p_ythread; /* Associated ULT */
331  void *data; /* Data for a specific scheduler */
332 
333  /* Scheduler functions */
338 
339 #ifdef ABT_CONFIG_USE_DEBUG_LOG
340  uint64_t id; /* ID */
341 #endif
342 };
343 
346 };
347 
349  /* Required pool operations */
355 };
356 
358  /* Optional pool operations */
366 };
367 
369  /* Pool operations that might be directly called even now, but
370  * deprecated. All operations are optional. */
374 };
375 
377  /* Pool operations that are not directly called now. */
387 };
388 
389 struct ABTI_pool {
390  ABT_pool_access access; /* Access mode */
391  ABT_bool automatic; /* To know if automatic data free */
392  ABT_bool is_builtin; /* Built-in pool. */
393  /* NOTE: int32_t to check if still positive */
394  ABTD_atomic_int32 num_scheds; /* Number of associated schedulers */
395  ABTD_atomic_int32 num_blocked; /* Number of blocked ULTs */
396  void *data; /* Specific data */
397  uint64_t id; /* ID */
398 
403 };
404 
412  symbol; /* This value is to check if ABT_pool_user_def points to
413  ABTI_pool_user_def or ABT_pool_def. */
416 };
417 
420 };
421 
422 struct ABTI_thread {
425  ABTD_atomic_int is_in_pool; /* Whether this thread is in a pool. */
426  ABTI_thread_type type; /* Thread type */
427  ABT_unit unit; /* Unit enclosing this thread */
428  ABTI_xstream *p_last_xstream; /* Last ES where it ran */
429  ABTI_thread *p_parent; /* Parent thread */
430  void (*f_thread)(void *); /* Thread function */
431  void *p_arg; /* Thread function argument */
432  ABTD_atomic_int state; /* State (ABT_thread_state) */
434  ABTI_pool *p_pool; /* Associated pool */
435  ABTD_atomic_ptr p_keytable; /* Thread-specific data (ABTI_ktable *) */
436  ABT_unit_id id; /* ID */
437 };
438 
440  void *p_stack; /* Stack address */
441  size_t stacksize; /* Stack size (in bytes) */
442 #ifndef ABT_CONFIG_DISABLE_MIGRATION
443  ABT_bool migratable; /* Migratability */
444  void (*f_cb)(ABT_thread, void *); /* Callback function */
445  void *p_cb_arg; /* Callback function argument */
446 #endif
447 };
448 
450  void (*f_migration_cb)(ABT_thread, void *); /* Callback function */
451  void *p_migration_cb_arg; /* Callback function argument */
453  p_migration_pool; /* Destination of migration (ABTI_pool *) */
454 };
455 
456 struct ABTI_ythread {
457  ABTI_thread thread; /* Common thread definition */
458  ABTD_ythread_context ctx; /* Context */
459 };
460 
461 struct ABTI_key {
462  void (*f_destructor)(void *value);
463  uint32_t id;
464 };
465 
466 struct ABTI_ktelem {
467  /* information of ABTI_key */
468  void (*f_destructor)(void *value);
469  uint32_t key_id;
470  void *value;
471  ABTD_atomic_ptr p_next; /* Next element (ABTI_ktelem *) */
472 };
473 
474 struct ABTI_ktable {
475  int size; /* size of the table */
476  ABTD_spinlock lock; /* Protects any new entry creation. */
477  void *p_used_mem;
478  void *p_extra_mem;
480  ABTD_atomic_ptr p_elems[1]; /* element array (ABTI_ktelem *) */
481 };
482 
483 struct ABTI_cond {
487 };
488 
489 struct ABTI_rwlock {
492  size_t reader_count;
494 };
495 
499  void *value;
500  size_t nbytes;
502 };
503 
504 struct ABTI_future {
508  void **array;
509  void (*p_callback)(void **arg);
511 };
512 
513 struct ABTI_barrier {
514  size_t num_waiters;
515  volatile size_t counter;
518 };
519 
521  uint32_t num_waiters;
522 #ifdef HAVE_PTHREAD_BARRIER_INIT
524 #else
525  ABTD_spinlock lock;
526  uint32_t counter;
527  ABTD_atomic_uint64 tag;
528 #endif
529 };
530 
531 struct ABTI_timer {
534 };
535 
536 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
537 struct ABTI_tool_context {
538  ABTI_thread *p_caller;
539  ABTI_pool *p_pool;
541  *p_parent; /* Parent of the target thread. Used to get the depth */
542  ABT_sync_event_type sync_event_type;
543  void *p_sync_object; /* ABTI type */
544 };
545 #endif
546 
547 /* Global Data */
550 
551 /* ES Local Data */
553 
554 /* Global information */
556 
557 /* Execution Stream (ES) */
559  ABTI_xstream **pp_xstream);
561  ABTI_xstream **pp_local_xstream,
562  ABTI_xstream *p_xstream,
563  ABTI_ythread *p_ythread);
564 void ABTI_xstream_free(ABTI_global *p_global, ABTI_local *p_local,
565  ABTI_xstream *p_xstream, ABT_bool force_free);
566 void ABTI_xstream_schedule(void *p_arg);
567 void ABTI_xstream_check_events(ABTI_xstream *p_xstream, ABTI_sched *p_sched);
568 void ABTI_xstream_print(ABTI_xstream *p_xstream, FILE *p_os, int indent,
569  ABT_bool print_sub);
570 
571 /* Scheduler */
576 void ABTI_sched_finish(ABTI_sched *p_sched);
577 void ABTI_sched_exit(ABTI_sched *p_sched);
578 ABTU_ret_err int ABTI_sched_create_basic(ABT_sched_predef predef, int num_pools,
579  ABT_pool *pools,
580  ABTI_sched_config *p_config,
581  ABTI_sched **pp_newsched);
582 void ABTI_sched_free(ABTI_global *p_global, ABTI_local *p_local,
583  ABTI_sched *p_sched, ABT_bool force_free);
585  ABTI_pool **);
588 void ABTI_sched_print(ABTI_sched *p_sched, FILE *p_os, int indent,
589  ABT_bool print_sub);
590 void ABTI_sched_reset_id(void);
591 
592 /* Scheduler config */
594  int idx, void *p_val);
595 
596 /* Pool */
598  ABT_pool_access access,
599  ABT_bool automatic,
600  ABTI_pool **pp_newpool);
601 void ABTI_pool_free(ABTI_pool *p_pool);
602 ABTU_ret_err int
604  ABTI_pool_required_def *p_required_def,
605  ABTI_pool_optional_def *p_optional_def,
606  ABTI_pool_deprecated_def *p_deprecated_def);
607 ABTU_ret_err int
609  ABTI_pool_required_def *p_required_def,
610  ABTI_pool_optional_def *p_optional_def,
611  ABTI_pool_deprecated_def *p_deprecated_def);
612 ABTU_ret_err int
614  ABTI_pool_required_def *p_required_def,
615  ABTI_pool_optional_def *p_optional_def,
616  ABTI_pool_deprecated_def *p_deprecated_def);
617 void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent);
618 void ABTI_pool_reset_id(void);
619 
620 /* Pool config */
622  int key, void *p_val);
623 
624 /* Pool definition */
626 
627 /* Work Unit */
628 void ABTI_unit_init_hash_table(ABTI_global *p_global);
631  ABTI_thread *p_thread);
632 void ABTI_unit_unmap_thread(ABTI_global *p_global, ABT_unit unit);
634  ABT_unit unit);
635 /* Threads */
637  ABTI_local *p_local,
638  ABTI_thread *p_thread,
639  ABTI_thread_mig_data **pp_mig_data);
640 ABTU_ret_err int ABTI_thread_revive(ABTI_global *p_global, ABTI_local *p_local,
641  ABTI_pool *p_pool,
642  void (*thread_func)(void *), void *arg,
643  ABTI_thread *p_thread);
644 void ABTI_thread_join(ABTI_local **pp_local, ABTI_thread *p_thread);
645 void ABTI_thread_free(ABTI_global *p_global, ABTI_local *p_local,
646  ABTI_thread *p_thread);
648  ABTI_xstream *p_local_xstream,
649  ABTI_thread *p_thread);
651  ABTI_local *p_local,
652  ABTI_thread *p_thread);
653 void ABTI_thread_print(ABTI_thread *p_thread, FILE *p_os, int indent);
654 void ABTI_thread_reset_id(void);
656 
657 /* Yieldable threads */
659  ABTI_local *p_local,
660  ABTI_xstream *p_xstream,
661  ABTI_ythread **pp_root_ythread);
663  ABTI_local *p_local,
664  ABTI_xstream *p_xstream,
665  ABTI_ythread **p_ythread);
667  ABTI_local *p_local,
668  ABTI_xstream *p_xstream,
669  ABTI_sched *p_sched);
671  ABTI_local *p_local,
672  ABTI_pool *p_pool,
673  ABTI_sched *p_sched);
674 void ABTI_ythread_free_primary(ABTI_global *p_global, ABTI_local *p_local,
675  ABTI_ythread *p_ythread);
676 void ABTI_ythread_free_root(ABTI_global *p_global, ABTI_local *p_local,
677  ABTI_ythread *p_ythread);
678 void ABTI_ythread_print_stack(ABTI_global *p_global, ABTI_ythread *p_ythread,
679  FILE *p_os);
680 
681 /* Thread attributes */
682 void ABTI_thread_attr_print(ABTI_thread_attr *p_attr, FILE *p_os, int indent);
683 ABTU_ret_err int
685  ABTI_thread_attr **pp_dup_attr) ABTU_ret_err;
686 
687 /* Key */
688 void ABTI_ktable_free(ABTI_global *p_global, ABTI_local *p_local,
689  ABTI_ktable *p_ktable);
690 
691 /* Information */
692 void ABTI_info_print_config(ABTI_global *p_global, FILE *fp);
694 
695 #include "abti_timer.h"
696 #include "abti_log.h"
697 #include "abti_local.h"
698 #include "abti_global.h"
699 #include "abti_self.h"
700 #include "abti_pool.h"
701 #include "abti_pool_config.h"
702 #include "abti_pool_user_def.h"
703 #include "abti_sched.h"
704 #include "abti_sched_config.h"
705 #include "abti_stream.h"
706 #include "abti_thread.h"
707 #include "abti_unit.h"
708 #include "abti_tool.h"
709 #include "abti_event.h"
710 #include "abti_ythread.h"
711 #include "abti_thread_attr.h"
712 #include "abti_waitlist.h"
713 #include "abti_mutex.h"
714 #include "abti_mutex_attr.h"
715 #include "abti_cond.h"
716 #include "abti_rwlock.h"
717 #include "abti_eventual.h"
718 #include "abti_future.h"
719 #include "abti_barrier.h"
720 #include "abti_stream_barrier.h"
721 #include "abti_mem.h"
722 #include "abti_key.h"
723 
724 #endif /* ABTI_H_INCLUDED */
ABT_pool_pop_fn
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
Definition: abt.h:2037
ABTI_key
Definition: abti.h:461
ABT_unit_get_task_fn
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
Definition: abt.h:2029
ABTI_pool_optional_def::p_get_size
ABT_pool_user_get_size_fn p_get_size
Definition: abti.h:361
gp_ABTI_local_func
ABTI_local_func gp_ABTI_local_func
Definition: local.c:23
ABTI_eventual::ready
ABT_bool ready
Definition: abti.h:498
ABT_sched_predef
ABT_sched_predef
Predefined scheduler type.
Definition: abt.h:475
ABTI_sched::data
void * data
Definition: abti.h:331
ABTI_global::mem_pool_desc_ext
ABTI_mem_pool_local_pool mem_pool_desc_ext
Definition: abti.h:263
ABTI_sched_config::p_table
ABTU_hashtable * p_table
Definition: abti.h:345
ABTI_barrier::counter
volatile size_t counter
Definition: abti.h:515
ABTI_pool::num_blocked
ABTD_atomic_int32 num_blocked
Definition: abti.h:395
ABTI_pool_optional_def::p_init
ABT_pool_user_init_fn p_init
Definition: abti.h:359
ABTI_xstream::ctx
ABTD_xstream_context ctx
Definition: abti.h:304
ABTI_waitlist::futex
ABTD_futex_multiple futex
Definition: abti.h:191
ABTI_global::sched_sleep_nsec
uint64_t sched_sleep_nsec
Definition: abti.h:240
abti_global.h
ABTI_pool_deprecated_def::p_remove
ABT_pool_remove_fn p_remove
Definition: abti.h:373
ABTI_pool_user_def::symbol
ABT_unit_create_from_thread_fn symbol
Definition: abti.h:412
abti_ythread.h
ABTI_thread_mig_data::f_migration_cb
void(* f_migration_cb)(ABT_thread, void *)
Definition: abti.h:450
ABTD_time
struct timespec ABTD_time
Definition: abtd.h:103
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:1043
ABTI_global::sched_stacksize
size_t sched_stacksize
Definition: abti.h:238
ABTI_sched_has_to_stop
ABT_bool ABTI_sched_has_to_stop(ABTI_sched *p_sched)
Definition: sched.c:925
ABTI_XSTREAM_TYPE_PRIMARY
@ ABTI_XSTREAM_TYPE_PRIMARY
Definition: abti.h:66
ABTI_future::array
void ** array
Definition: abti.h:508
abti_pool_user_def.h
abti_thread_attr.h
abti_key.h
ABTI_ktable::lock
ABTD_spinlock lock
Definition: abti.h:476
ABTI_sched_create_basic
ABTU_ret_err int ABTI_sched_create_basic(ABT_sched_predef predef, int num_pools, ABT_pool *pools, ABTI_sched_config *p_config, ABTI_sched **pp_newsched)
Definition: sched.c:710
ABTI_global::print_raw_stack
ABT_bool print_raw_stack
Definition: abti.h:235
ABTI_unit_to_thread_entry::lock
ABTD_spinlock lock
Definition: abti.h:220
ABT_unit_is_in_pool_fn
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
Definition: abt.h:2030
ABTI_SCHED_NOT_USED
@ ABTI_SCHED_NOT_USED
Definition: abti.h:71
ABTD_atomic_int
Definition: abtd_atomic.h:15
abti_rwlock.h
abti_sched.h
ABTI_STACK_GUARD_MPROTECT_STRICT
@ ABTI_STACK_GUARD_MPROTECT_STRICT
Definition: abti.h:79
ABTD_atomic_uint64
Definition: abtd_atomic.h:35
ABTI_sched_has_unit
ABT_bool ABTI_sched_has_unit(ABTI_sched *p_sched)
Definition: sched.c:948
ABT_sched_run_fn
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:1402
abti_cond.h
ABTI_global::mem_lp_alloc
int mem_lp_alloc
Definition: abti.h:253
ABT_thread
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
Definition: abt.h:932
ABTI_pool_required_def::p_push
ABT_pool_user_push_fn p_push
Definition: abti.h:354
ABTI_pool_required_def::p_pop
ABT_pool_user_pop_fn p_pop
Definition: abti.h:353
ABTI_thread_mig_data::p_migration_pool
ABTD_atomic_ptr p_migration_pool
Definition: abti.h:453
ABTI_mem_pool_local_pool
Definition: abti_mem_pool.h:101
abti_thread.h
ABTI_global::xstream_list_lock
ABTD_spinlock xstream_list_lock
Definition: abti.h:228
ABT_unit_get_type_fn
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
Definition: abt.h:2027
ABTI_xstream_schedule
void ABTI_xstream_schedule(void *p_arg)
ABTI_future
Definition: abti.h:504
ABTI_global::mem_pool_stack
ABTI_mem_pool_global_pool mem_pool_stack
Definition: abti.h:255
ABTI_thread::type
ABTI_thread_type type
Definition: abti.h:426
ABTI_barrier::waitlist
ABTI_waitlist waitlist
Definition: abti.h:517
ABTI_pool_optional_def::p_print_all
ABT_pool_user_print_all_fn p_print_all
Definition: abti.h:365
ABTI_thread_attr::migratable
ABT_bool migratable
Definition: abti.h:443
ABTI_thread_revive
ABTU_ret_err int ABTI_thread_revive(ABTI_global *p_global, ABTI_local *p_local, ABTI_pool *p_pool, void(*thread_func)(void *), void *arg, ABTI_thread *p_thread)
Definition: thread.c:2507
ABTI_sched_exit
void ABTI_sched_exit(ABTI_sched *p_sched)
Definition: sched.c:705
ABTI_pool_optional_def
Definition: abti.h:357
ABTI_mutex_attr::attrs
int attrs
Definition: abti.h:198
ABT_pool_user_print_all_fn
void(* ABT_pool_user_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_thread))
Function that applies a user-given function to all work units in a pool.
Definition: abt.h:2023
ABTI_pool_old_def::u_free
ABT_unit_free_fn u_free
Definition: abti.h:379
ABTI_sched_used
ABTI_sched_used
Definition: abti.h:70
abti_log.h
ABTI_eventual
Definition: abti.h:496
ABT_pool_user_create_unit_fn
ABT_unit(* ABT_pool_user_create_unit_fn)(ABT_pool, ABT_thread)
Function that creates an ABT_unit handle that is associated with an ABT_thread handle.
Definition: abt.h:1807
ABTI_pool_reset_id
void ABTI_pool_reset_id(void)
Definition: pool.c:1512
ABTD_xstream_context
Definition: abtd.h:24
ABTI_xstream_barrier
Definition: abti.h:520
ABTI_thread_print
void ABTI_thread_print(ABTI_thread *p_thread, FILE *p_os, int indent)
Definition: thread.c:2702
ABTI_pool_old_def::u_create_from_thread
ABT_unit_create_from_thread_fn u_create_from_thread
Definition: abti.h:378
ABTI_rwlock::reader_count
size_t reader_count
Definition: abti.h:492
abti_stream.h
ABTI_atomic_unit_to_thread
Definition: abti.h:214
ABT_pool_pop_wait_fn
ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)
Definition: abt.h:2038
ABTI_sched::num_pools
size_t num_pools
Definition: abti.h:329
ABTI_thread::p_next
ABTI_thread * p_next
Definition: abti.h:424
ABTI_sched::automatic
ABT_bool automatic
Definition: abti.h:321
ABTI_xstream::rank
int rank
Definition: abti.h:299
gp_ABTI_global
ABTI_global * gp_ABTI_global
Definition: global.c:19
ABTI_thread::p_arg
void * p_arg
Definition: abti.h:431
abti_timer.h
ABTI_local_func
Definition: abti.h:286
ABTI_waitlist::p_tail
ABTI_thread * p_tail
Definition: abti.h:194
ABTI_thread::unit
ABT_unit unit
Definition: abti.h:427
ABTI_xstream::type
ABTI_xstream_type type
Definition: abti.h:300
ABTI_thread::request
ABTD_atomic_uint32 request
Definition: abti.h:433
ABTI_timer::end
ABTD_time end
Definition: abti.h:533
ABTI_xstream::mem_pool_stack
ABTI_mem_pool_local_pool mem_pool_stack
Definition: abti.h:314
abti_barrier.h
abti_sched_config.h
ABTI_pool::automatic
ABT_bool automatic
Definition: abti.h:391
ABTI_thread_get_id
ABT_unit_id ABTI_thread_get_id(ABTI_thread *p_thread)
Definition: thread.c:2803
ABTI_pool_old_def::p_push
ABT_pool_push_fn p_push
Definition: abti.h:382
ABTI_ktable::extra_mem_size
size_t extra_mem_size
Definition: abti.h:479
ABTI_global::print_config
ABT_bool print_config
Definition: abti.h:268
ABTI_thread_mig_data
Definition: abti.h:449
ABTD_XSTREAM_LOCAL
#define ABTD_XSTREAM_LOCAL
Definition: abtd.h:44
ABTI_thread_free
void ABTI_thread_free(ABTI_global *p_global, ABTI_local *p_local, ABTI_thread *p_thread)
Definition: thread.c:2616
abtd.h
ABTI_future::counter
ABTD_atomic_size counter
Definition: abti.h:506
ABTI_mutex::lock
ABTD_spinlock lock
Definition: abti.h:205
ABTI_eventual::nbytes
size_t nbytes
Definition: abti.h:500
ABTI_ythread_create_primary
ABTU_ret_err int ABTI_ythread_create_primary(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABTI_ythread **p_ythread)
Definition: thread.c:2520
ABT_pool_pop_timedwait_fn
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
Definition: abt.h:2039
ABTI_unit_unmap_thread
void ABTI_unit_unmap_thread(ABTI_global *p_global, ABT_unit unit)
Definition: unit.c:112
ABTI_thread
Definition: abti.h:422
ABT_sched_type
ABT_sched_type
Scheduler's work unit type.
Definition: abt.h:500
ABTI_barrier
Definition: abti.h:513
ABTI_xstream
Definition: abti.h:294
ABTD_ythread_context
Definition: abtd_fcontext.h:56
ABT_pool_print_all_fn
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:2042
abti_future.h
ABTI_future::num_compartments
size_t num_compartments
Definition: abti.h:507
ABT_pool_user_push_many_fn
void(* ABT_pool_user_push_many_fn)(ABT_pool, const ABT_unit *, size_t, ABT_pool_context)
Function that pushes work units to a pool.
Definition: abt.h:2003
ABTI_sched_config
Definition: abti.h:344
ABTI_pool_required_def::p_free_unit
ABT_pool_user_free_unit_fn p_free_unit
Definition: abti.h:351
ABT_pool
struct ABT_pool_opaque * ABT_pool
Pool handle type.
Definition: abt.h:878
ABTD_spinlock
Definition: abtd_spinlock.h:9
ABTI_sched::p_ythread
ABTI_ythread * p_ythread
Definition: abti.h:330
ABTI_global::stack_guard_kind
ABTI_stack_guard stack_guard_kind
Definition: abti.h:266
ABTI_mutex::attrs
int attrs
Definition: abti.h:202
ABTI_waitlist
Definition: abti.h:189
ABTI_sched::type
ABT_sched_type type
Definition: abti.h:323
ABTI_pool_config::p_table
ABTU_hashtable * p_table
Definition: abti.h:419
ABTI_xstream::p_next
ABTI_xstream * p_next
Definition: abti.h:297
ABTI_SCHED_IN_POOL
@ ABTI_SCHED_IN_POOL
Definition: abti.h:73
ABTI_thread_attr_print
void ABTI_thread_attr_print(ABTI_thread_attr *p_attr, FILE *p_os, int indent)
Definition: thread_attr.c:391
ABTI_pool_old_def::p_init
ABT_pool_init_fn p_init
Definition: abti.h:380
ABTI_thread_attr
Definition: abti.h:439
ABT_pool_user_get_size_fn
size_t(* ABT_pool_user_get_size_fn)(ABT_pool)
Function that returns the number of work units in a pool.
Definition: abt.h:1927
ABTI_pool_deprecated_def::p_pop_timedwait
ABT_pool_pop_timedwait_fn p_pop_timedwait
Definition: abti.h:372
ABTI_sched::used
ABTI_sched_used used
Definition: abti.h:320
ABT_pool_user_push_fn
void(* ABT_pool_user_push_fn)(ABT_pool, ABT_unit, ABT_pool_context)
Function that pushes a work unit to a pool.
Definition: abt.h:1879
ABTI_pool_required_def
Definition: abti.h:348
ABTI_pool
Definition: abti.h:389
ABT_unit_free_fn
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:2033
ABTI_pool_user_def::dummy_access
ABT_pool_access dummy_access
Definition: abti.h:406
abti_pool.h
ABTI_sched_get_basic_wait_def
ABT_sched_def * ABTI_sched_get_basic_wait_def(void)
Definition: basic_wait.c:27
ABTI_cond
Definition: abti.h:483
ABTI_mutex::waitlist
ABTI_waitlist waitlist
Definition: abti.h:210
ABTI_xstream_barrier::num_waiters
uint32_t num_waiters
Definition: abti.h:521
ABT_sync_event_type
ABT_sync_event_type
Type of synchronization event.
Definition: abt.h:696
ABTI_rwlock::write_flag
int write_flag
Definition: abti.h:493
ABTI_global::use_logging
ABT_bool use_logging
Definition: abti.h:233
ABTI_pool_free
void ABTI_pool_free(ABTI_pool *p_pool)
Definition: pool.c:1433
ABTI_pool::is_builtin
ABT_bool is_builtin
Definition: abti.h:392
ABTI_info_check_print_all_thread_stacks
void ABTI_info_check_print_all_thread_stacks(void)
Definition: info.c:1039
ABTI_timer
Definition: abti.h:531
ABTI_pool::data
void * data
Definition: abti.h:396
ABTI_ythread_free_root
void ABTI_ythread_free_root(ABTI_global *p_global, ABTI_local *p_local, ABTI_ythread *p_ythread)
Definition: thread.c:2629
ABTI_ktable::p_extra_mem
void * p_extra_mem
Definition: abti.h:478
ABT_unit_id
uint64_t ABT_unit_id
Work unit ID type.
Definition: abt.h:921
ABT_pool_def
A struct that defines a pool.
Definition: abt.h:2049
ABTI_global::unit_to_thread_entires
ABTI_unit_to_thread_entry unit_to_thread_entires[ABTI_UNIT_HASH_TABLE_SIZE]
Definition: abti.h:279
ABTI_rwlock
Definition: abti.h:489
ABTI_global::sys_page_size
size_t sys_page_size
Definition: abti.h:246
ABT_pool_remove_fn
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:2040
ABTI_global::mem_page_size
size_t mem_page_size
Definition: abti.h:249
ABT_pool_init_fn
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:2034
ABTI_thread::state
ABTD_atomic_int state
Definition: abti.h:432
ABTI_pool_deprecated_def::u_is_in_pool
ABT_unit_is_in_pool_fn u_is_in_pool
Definition: abti.h:371
ABTI_global::thread_stacksize
size_t thread_stacksize
Definition: abti.h:237
ABTI_sched_id
void * ABTI_sched_id
Definition: abti.h:139
ABTI_barrier::num_waiters
size_t num_waiters
Definition: abti.h:514
ABTD_atomic_int32
Definition: abtd_atomic.h:23
ABTI_global::huge_page_size
size_t huge_page_size
Definition: abti.h:247
ABTI_timer::start
ABTD_time start
Definition: abti.h:532
ABTI_xstream_free
void ABTI_xstream_free(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABT_bool force_free)
Definition: stream.c:1639
ABTI_sched_finish
void ABTI_sched_finish(ABTI_sched *p_sched)
Definition: sched.c:700
ABTI_sched::free
ABT_sched_free_fn free
Definition: abti.h:336
ABTI_pool_old_def
Definition: abti.h:376
ABTD_atomic_ptr
Definition: abtd_atomic.h:39
ABTI_pool_user_def::optional_def
ABTI_pool_optional_def optional_def
Definition: abti.h:415
abti_stream_barrier.h
ABTI_pool_get_randws_def
ABTU_ret_err int ABTI_pool_get_randws_def(ABT_pool_access access, ABTI_pool_required_def *p_required_def, ABTI_pool_optional_def *p_optional_def, ABTI_pool_deprecated_def *p_deprecated_def)
Definition: randws.c:64
abti_unit.h
ABTI_unit_finalize_hash_table
void ABTI_unit_finalize_hash_table(ABTI_global *p_global)
Definition: unit.c:101
ABTI_eventual::lock
ABTD_spinlock lock
Definition: abti.h:497
ABTI_pool_create_basic
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:1389
ABTI_xstream::p_main_sched
ABTI_sched * p_main_sched
Definition: abti.h:302
ABTI_pool_user_def::dummy_fn1
ABT_unit_get_type_fn dummy_fn1
Definition: abti.h:407
ABT_sched_init_fn
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
Definition: abt.h:1401
ABTI_thread_mig_data::p_migration_cb_arg
void * p_migration_cb_arg
Definition: abti.h:451
ABTI_thread_handle_request_migrate
ABTU_ret_err int ABTI_thread_handle_request_migrate(ABTI_global *p_global, ABTI_local *p_local, ABTI_thread *p_thread)
Definition: thread.c:2674
ABTI_sched_get_migration_pool
ABTU_ret_err int ABTI_sched_get_migration_pool(ABTI_sched *, ABTI_pool *, ABTI_pool **)
Definition: sched.c:983
ABTI_thread_attr::p_cb_arg
void * p_cb_arg
Definition: abti.h:445
ABTI_sched::get_migr_pool
ABT_sched_get_migr_pool_fn get_migr_pool
Definition: abti.h:337
abti_mem.h
ABTI_global::sched_event_freq
uint32_t sched_event_freq
Definition: abti.h:239
ABTI_pool_optional_def::p_pop_wait
ABT_pool_user_pop_wait_fn p_pop_wait
Definition: abti.h:362
ABTI_XSTREAM_TYPE_SECONDARY
@ ABTI_XSTREAM_TYPE_SECONDARY
Definition: abti.h:67
ABTD_futex_multiple
Definition: abtd_futex.h:75
ABTI_rwlock::cond
ABTI_cond cond
Definition: abti.h:491
ABTI_sched_reset_id
void ABTI_sched_reset_id(void)
Definition: sched.c:1072
ABTI_thread_join
void ABTI_thread_join(ABTI_local **pp_local, ABTI_thread *p_thread)
Definition: thread.c:2611
ABTI_ktelem::value
void * value
Definition: abti.h:470
ABTD_atomic_uint32
Definition: abtd_atomic.h:27
ABTI_sched_get_basic_def
ABT_sched_def * ABTI_sched_get_basic_def(void)
Definition: basic.c:30
ABTI_sched_config_read
ABTU_ret_err int ABTI_sched_config_read(const ABTI_sched_config *p_config, int idx, void *p_val)
Definition: sched_config.c:415
ABT_unit
struct ABT_unit_opaque * ABT_unit
Work unit handle type for scheduling.
Definition: abt.h:911
ABT_pool_user_pop_many_fn
void(* ABT_pool_user_pop_many_fn)(ABT_pool, ABT_thread *, size_t, size_t *, ABT_pool_context)
Function that pops work units from a pool.
Definition: abt.h:1978
ABTI_sched_get_randws_def
ABT_sched_def * ABTI_sched_get_randws_def(void)
Definition: randws.c:31
abt_config.h
ABTI_pool_old_def::p_pop
ABT_pool_pop_fn p_pop
Definition: abti.h:383
ABTI_global::mem_pool_stack_ext
ABTI_mem_pool_local_pool mem_pool_stack_ext
Definition: abti.h:261
ABTI_mutex::waiter_lock
ABTD_spinlock waiter_lock
Definition: abti.h:209
ABTD_xstream_barrier
pthread_barrier_t ABTD_xstream_barrier
Definition: abtd.h:34
ABTI_ythread::ctx
ABTD_ythread_context ctx
Definition: abti.h:458
ABTI_xstream_print
void ABTI_xstream_print(ABTI_xstream *p_xstream, FILE *p_os, int indent, ABT_bool print_sub)
Definition: stream.c:1672
ABTI_global::mutex_max_handovers
uint32_t mutex_max_handovers
Definition: abti.h:244
ABTI_initialized
ABT_bool ABTI_initialized(void)
Definition: global.c:187
ABTI_cond::p_waiter_mutex
ABTI_mutex * p_waiter_mutex
Definition: abti.h:485
ABTI_atomic_unit_to_thread::val
ABTD_atomic_ptr val
Definition: abti.h:215
ABTI_global::mem_sp_size
size_t mem_sp_size
Definition: abti.h:250
ABTI_sched::pools
ABT_pool * pools
Definition: abti.h:328
ABTI_sched::p_replace_sched
ABTI_sched * p_replace_sched
Definition: abti.h:324
ABTI_pool_old_def::p_free
ABT_pool_free_fn p_free
Definition: abti.h:385
ABTI_thread::is_in_pool
ABTD_atomic_int is_in_pool
Definition: abti.h:425
ABTI_pool_user_def::dummy_fn2
ABT_unit_get_thread_fn dummy_fn2
Definition: abti.h:408
ABT_CONFIG_STATIC_CACHELINE_SIZE
#define ABT_CONFIG_STATIC_CACHELINE_SIZE
Definition: abt_config.h:81
ABTI_unit_get_thread_from_user_defined_unit
ABTI_thread * ABTI_unit_get_thread_from_user_defined_unit(ABTI_global *p_global, ABT_unit unit)
Definition: unit.c:117
ABTI_xstream::state
ABTD_atomic_int state
Definition: abti.h:301
ABTI_global::num_xstreams
int num_xstreams
Definition: abti.h:225
ABTI_pool_get_fifo_wait_def
ABTU_ret_err int ABTI_pool_get_fifo_wait_def(ABT_pool_access access, ABTI_pool_required_def *p_required_def, ABTI_pool_optional_def *p_optional_def, ABTI_pool_deprecated_def *p_deprecated_def)
Definition: fifo_wait.c:47
ABTI_unit_init_hash_table
void ABTI_unit_init_hash_table(ABTI_global *p_global)
Definition: unit.c:96
ABTI_pool_config
Definition: abti.h:418
ABTI_global::p_primary_ythread
ABTI_ythread * p_primary_ythread
Definition: abti.h:241
ABTI_mutex::nesting_cnt
int nesting_cnt
Definition: abti.h:206
ABTI_pool_user_def::dummy_fn4
ABT_unit_is_in_pool_fn dummy_fn4
Definition: abti.h:410
ABT_pool_user_pop_wait_fn
ABT_thread(* ABT_pool_user_pop_wait_fn)(ABT_pool, double, ABT_pool_context)
Function that pops a work unit from a pool with wait.
Definition: abt.h:1950
ABTI_local_func::padding2
char padding2[ABT_CONFIG_STATIC_CACHELINE_SIZE]
Definition: abti.h:291
ABTI_xstream::p_root_pool
ABTI_pool * p_root_pool
Definition: abti.h:308
ABTI_xstream_check_events
void ABTI_xstream_check_events(ABTI_xstream *p_xstream, ABTI_sched *p_sched)
Definition: stream.c:1624
abti_valgrind.h
ABTU_ret_err
#define ABTU_ret_err
Definition: abtu.h:155
ABTI_thread_attr::stacksize
size_t stacksize
Definition: abti.h:441
ABTI_local_func::padding1
char padding1[ABT_CONFIG_STATIC_CACHELINE_SIZE]
Definition: abti.h:287
ABTI_thread_id
struct ABTI_thread_id_opaque * ABTI_thread_id
Definition: abti.h:175
ABT_pool_user_free_fn
void(* ABT_pool_user_free_fn)(ABT_pool)
Function that frees a pool.
Definition: abt.h:1911
abt.h
ABTI_global::p_xstream_head
ABTI_xstream * p_xstream_head
Definition: abti.h:226
ABTI_sched::kind
ABTI_sched_kind kind
Definition: abti.h:322
ABTI_xstream::mem_pool_desc
ABTI_mem_pool_local_pool mem_pool_desc
Definition: abti.h:315
ABT_unit_get_thread_fn
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
Definition: abt.h:2028
ABTI_pool::required_def
ABTI_pool_required_def required_def
Definition: abti.h:399
ABTI_pool_optional_def::p_push_many
ABT_pool_user_push_many_fn p_push_many
Definition: abti.h:364
ABTI_pool::deprecated_def
ABTI_pool_deprecated_def deprecated_def
Definition: abti.h:401
ABTI_local_func::set_local_xstream_f
void(* set_local_xstream_f)(ABTI_xstream *)
Definition: abti.h:289
ABTI_SCHED_MAIN
@ ABTI_SCHED_MAIN
Definition: abti.h:72
ABTI_STACK_GUARD_MPROTECT
@ ABTI_STACK_GUARD_MPROTECT
Definition: abti.h:78
ABTI_thread_attr_dup
ABTU_ret_err int ABTI_thread_attr_dup(const ABTI_thread_attr *p_attr, ABTI_thread_attr **pp_dup_attr) ABTU_ret_err
Definition: thread_attr.c:419
ABTI_global::mutex_max_wakeups
uint32_t mutex_max_wakeups
Definition: abti.h:245
ABTI_sched::run
ABT_sched_run_fn run
Definition: abti.h:335
abti_pool_config.h
ABT_pool_push_fn
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:2036
ABTI_thread_type
uint32_t ABTI_thread_type
Definition: abti.h:152
ABTI_ktelem::key_id
uint32_t key_id
Definition: abti.h:469
ABTI_STACK_GUARD_NONE
@ ABTI_STACK_GUARD_NONE
Definition: abti.h:77
ABTI_sched::request
ABTD_atomic_uint32 request
Definition: abti.h:327
ABTI_mem_pool_global_pool
Definition: abti_mem_pool.h:58
abti_waitlist.h
ABTI_global::key_table_size
uint32_t key_table_size
Definition: abti.h:236
abti_sync_lifo.h
ABTI_ktable
Definition: abti.h:474
ABTI_waitlist::p_head
ABTI_thread * p_head
Definition: abti.h:193
ABTI_future::lock
ABTD_spinlock lock
Definition: abti.h:505
ABTI_key::id
uint32_t id
Definition: abti.h:463
ABTI_sched
Definition: abti.h:319
ABTI_xstream_start_primary
void ABTI_xstream_start_primary(ABTI_global *p_global, ABTI_xstream **pp_local_xstream, ABTI_xstream *p_xstream, ABTI_ythread *p_ythread)
Definition: stream.c:1597
ABTI_ythread_create_root
ABTU_ret_err int ABTI_ythread_create_root(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABTI_ythread **pp_root_ythread)
Definition: thread.c:2546
ABT_pool_user_free_unit_fn
void(* ABT_pool_user_free_unit_fn)(ABT_pool, ABT_unit)
Function that frees an ABT_unit handle.
Definition: abt.h:1824
ABTI_xstream::p_root_ythread
ABTI_ythread * p_root_ythread
Definition: abti.h:307
ABTI_ythread
Definition: abti.h:456
ABTI_sched_kind
uintptr_t ABTI_sched_kind
Definition: abti.h:140
ABTI_pool::access
ABT_pool_access access
Definition: abti.h:390
abti_mem_pool.h
ABTI_global::mem_max_stacks
uint32_t mem_max_stacks
Definition: abti.h:251
ABTI_unit_to_thread_entry::list
ABTI_atomic_unit_to_thread list
Definition: abti.h:219
ABTI_ktable::size
int size
Definition: abti.h:475
ABTI_mutex_attr
Definition: abti.h:197
ABTI_eventual::value
void * value
Definition: abti.h:499
ABTI_pool::old_def
ABTI_pool_old_def old_def
Definition: abti.h:402
abti_tool.h
ABTI_ythread_free_primary
void ABTI_ythread_free_primary(ABTI_global *p_global, ABTI_local *p_local, ABTI_ythread *p_ythread)
Definition: thread.c:2622
ABTD_atomic_size
Definition: abtd_atomic.h:19
ABTI_pool_optional_def::p_pop_many
ABT_pool_user_pop_many_fn p_pop_many
Definition: abti.h:363
ABT_pool_user_is_empty_fn
ABT_bool(* ABT_pool_user_is_empty_fn)(ABT_pool)
Function that returns if a pool is empty.
Definition: abt.h:1840
ABTI_eventual::waitlist
ABTI_waitlist waitlist
Definition: abti.h:501
ABTI_ktelem
Definition: abti.h:466
ABTI_pool_old_def::p_pop_wait
ABT_pool_pop_wait_fn p_pop_wait
Definition: abti.h:384
abti_eventual.h
ABTI_thread::p_parent
ABTI_thread * p_parent
Definition: abti.h:429
ABTI_ktelem::f_destructor
void(* f_destructor)(void *value)
Definition: abti.h:468
ABTI_thread_handle_request_cancel
void ABTI_thread_handle_request_cancel(ABTI_global *p_global, ABTI_xstream *p_local_xstream, ABTI_thread *p_thread)
Definition: thread.c:2660
ABT_sched_def
A struct that defines a scheduler.
Definition: abt.h:1411
lp_ABTI_local
ABTD_XSTREAM_LOCAL ABTI_local * lp_ABTI_local
Definition: local.c:29
ABT_pool_user_pop_fn
ABT_thread(* ABT_pool_user_pop_fn)(ABT_pool, ABT_pool_context)
Function that pops a work unit from a pool.
Definition: abt.h:1859
ABTI_cond::lock
ABTD_spinlock lock
Definition: abti.h:484
ABTI_future::waitlist
ABTI_waitlist waitlist
Definition: abti.h:510
ABTI_pool_config_read
ABTU_ret_err int ABTI_pool_config_read(const ABTI_pool_config *p_config, int key, void *p_val)
Definition: pool_config.c:270
ABTI_barrier::lock
ABTD_spinlock lock
Definition: abti.h:516
ABTI_rwlock::mutex
ABTI_mutex mutex
Definition: abti.h:490
abti_event.h
ABTI_pool_get_fifo_def
ABTU_ret_err int ABTI_pool_get_fifo_def(ABT_pool_access access, ABTI_pool_required_def *p_required_def, ABTI_pool_optional_def *p_optional_def, ABTI_pool_deprecated_def *p_deprecated_def)
Definition: fifo.c:58
ABTI_ythread_create_main_sched
ABTU_ret_err int ABTI_ythread_create_main_sched(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABTI_sched *p_sched)
Definition: thread.c:2573
ABTI_UNIT_HASH_TABLE_SIZE
#define ABTI_UNIT_HASH_TABLE_SIZE
Definition: abti.h:58
ABT_sched_get_migr_pool_fn
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
Definition: abt.h:1405
ABTI_global::use_debug
ABT_bool use_debug
Definition: abti.h:234
ABTI_thread::p_last_xstream
ABTI_xstream * p_last_xstream
Definition: abti.h:428
ABTI_global::mem_pool_desc_lock
ABTD_spinlock mem_pool_desc_lock
Definition: abti.h:262
ABT_pool_get_size_fn
size_t(* ABT_pool_get_size_fn)(ABT_pool)
Definition: abt.h:2035
ABTI_ktable::p_used_mem
void * p_used_mem
Definition: abti.h:477
ABTI_sched::init
ABT_sched_init_fn init
Definition: abti.h:334
ABTI_thread_attr::p_stack
void * p_stack
Definition: abti.h:440
ABTI_sched_free
void ABTI_sched_free(ABTI_global *p_global, ABTI_local *p_local, ABTI_sched *p_sched, ABT_bool force_free)
Definition: sched.c:889
ABTI_pool_user_def
Definition: abti.h:405
ABTI_ktelem::p_next
ABTD_atomic_ptr p_next
Definition: abti.h:471
ABTI_thread::p_keytable
ABTD_atomic_ptr p_keytable
Definition: abti.h:435
ABTI_thread_get_mig_data
ABTU_ret_err int ABTI_thread_get_mig_data(ABTI_global *p_global, ABTI_local *p_local, ABTI_thread *p_thread, ABTI_thread_mig_data **pp_mig_data)
Definition: thread.c:2635
ABTI_pool_old_def::p_print_all
ABT_pool_print_all_fn p_print_all
Definition: abti.h:386
ABTI_global::mem_pool_stack_lock
ABTD_spinlock mem_pool_stack_lock
Definition: abti.h:260
ABTI_ythread::thread
ABTI_thread thread
Definition: abti.h:457
ABTI_thread::p_prev
ABTI_thread * p_prev
Definition: abti.h:423
ABTI_local
struct ABTI_local ABTI_local
Definition: abti.h:132
ABTI_xstream::ABTU_align_member_var
ABTU_align_member_var(ABT_CONFIG_STATIC_CACHELINE_SIZE) ABTI_thread *p_thread
ABTI_thread_attr::f_cb
void(* f_cb)(ABT_thread, void *)
Definition: abti.h:444
ABT_pool_free_fn
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:2041
ABTI_global::set_affinity
ABT_bool set_affinity
Definition: abti.h:232
ABTI_ktable::p_elems
ABTD_atomic_ptr p_elems[1]
Definition: abti.h:480
ABTI_pool_user_def::required_def
ABTI_pool_required_def required_def
Definition: abti.h:414
ABTI_stack_guard
ABTI_stack_guard
Definition: abti.h:76
ABTI_pool_print
void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent)
Definition: pool.c:1459
ABTI_pool::id
uint64_t id
Definition: abti.h:397
ABT_pool_user_init_fn
int(* ABT_pool_user_init_fn)(ABT_pool, ABT_pool_config)
Function that creates a pool.
Definition: abt.h:1896
abti_mutex_attr.h
ABTI_global
Definition: abti.h:223
ABTI_thread::f_thread
void(* f_thread)(void *)
Definition: abti.h:430
abtu.h
ABTI_pool_user_def::dummy_fn3
ABT_unit_get_task_fn dummy_fn3
Definition: abti.h:409
ABTI_ktable_free
void ABTI_ktable_free(ABTI_global *p_global, ABTI_local *p_local, ABTI_ktable *p_ktable)
Definition: key.c:247
ABTI_thread_reset_id
void ABTI_thread_reset_id(void)
Definition: thread.c:2798
ABT_tool_thread_callback_fn
void(* ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
Definition: abt.h:2307
ABTI_pool::optional_def
ABTI_pool_optional_def optional_def
Definition: abti.h:400
ABTI_thread::p_pool
ABTI_pool * p_pool
Definition: abti.h:434
ABTI_ythread_create_sched
ABTU_ret_err int ABTI_ythread_create_sched(ABTI_global *p_global, ABTI_local *p_local, ABTI_pool *p_pool, ABTI_sched *p_sched)
Definition: thread.c:2593
ABTI_global::num_cores
int num_cores
Definition: abti.h:231
ABTI_xstream::p_prev
ABTI_xstream * p_prev
Definition: abti.h:296
abti_error.h
ABTI_xstream_type
ABTI_xstream_type
Definition: abti.h:65
ABTI_native_thread_id
struct ABTI_native_thread_id_opaque * ABTI_native_thread_id
Definition: abti.h:172
ABTI_pool_deprecated_def
Definition: abti.h:368
ABTI_pool_required_def::p_is_empty
ABT_pool_user_is_empty_fn p_is_empty
Definition: abti.h:352
ABTI_unit_map_thread
ABTU_ret_err int ABTI_unit_map_thread(ABTI_global *p_global, ABT_unit unit, ABTI_thread *p_thread)
Definition: unit.c:106
ABT_sched_free_fn
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:1403
ABTI_xstream_create_primary
ABTU_ret_err int ABTI_xstream_create_primary(ABTI_global *p_global, ABTI_xstream **pp_xstream)
Definition: stream.c:1572
ABTI_pool_user_def_is_new
ABT_bool ABTI_pool_user_def_is_new(const ABT_pool_user_def def)
Definition: pool_user_def.c:368
ABT_pool_kind
ABT_pool_kind
Predefined pool type.
Definition: abt.h:514
ABTI_future::p_callback
void(* p_callback)(void **arg)
Definition: abti.h:509
ABTI_sched::p_replace_waiter
ABTI_ythread * p_replace_waiter
Definition: abti.h:326
ABTI_cond::waitlist
ABTI_waitlist waitlist
Definition: abti.h:486
ABTI_pool::num_scheds
ABTD_atomic_int32 num_scheds
Definition: abti.h:394
ABTI_global::max_xstreams
int max_xstreams
Definition: abti.h:224
abti_self.h
ABTI_ythread_print_stack
void ABTI_ythread_print_stack(ABTI_global *p_global, ABTI_ythread *p_ythread, FILE *p_os)
Definition: ythread.c:230
ABTI_thread::id
ABT_unit_id id
Definition: abti.h:436
ABTI_pool_required_def::p_create_unit
ABT_pool_user_create_unit_fn p_create_unit
Definition: abti.h:350
ABTI_global::mem_pool_desc
ABTI_mem_pool_global_pool mem_pool_desc
Definition: abti.h:256
ABTI_global::mem_max_descs
uint32_t mem_max_descs
Definition: abti.h:252
ABTI_pool_old_def::p_get_size
ABT_pool_get_size_fn p_get_size
Definition: abti.h:381
ABTI_pool_optional_def::p_free
ABT_pool_user_free_fn p_free
Definition: abti.h:360
abti_local.h
ABTI_info_print_config
void ABTI_info_print_config(ABTI_global *p_global, FILE *fp)
Definition: info.c:1110
ABTI_unit_to_thread_entry
Definition: abti.h:218
ABTI_sched_get_prio_def
ABT_sched_def * ABTI_sched_get_prio_def(void)
Definition: prio.c:29
ABTU_hashtable
Definition: abtu.h:347
ABTI_mutex::owner_id
ABTI_thread_id owner_id
Definition: abti.h:207
ABTI_mutex
Definition: abti.h:201
ABTI_key::f_destructor
void(* f_destructor)(void *value)
Definition: abti.h:462
ABT_unit_create_from_thread_fn
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
Definition: abt.h:2031
ABTI_xstream_barrier::bar
ABTD_xstream_barrier bar
Definition: abti.h:523
ABT_pool_access
ABT_pool_access
Pool access type.
Definition: abt.h:556
ABTI_sched_print
void ABTI_sched_print(ABTI_sched *p_sched, FILE *p_os, int indent, ABT_bool print_sub)
Definition: sched.c:1000
abti_mutex.h