ARGOBOTS  1.1
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 #include "abtu.h"
32 #include "abti_error.h"
33 #include "abti_valgrind.h"
34 
35 /* Constants */
36 #define ABTI_SCHED_NUM_PRIO 3
37 
38 #define ABTI_SCHED_REQ_FINISH (1 << 0)
39 #define ABTI_SCHED_REQ_EXIT (1 << 1)
40 #define ABTI_SCHED_REQ_REPLACE (1 << 2)
41 
42 #define ABTI_THREAD_REQ_JOIN (1 << 0)
43 #define ABTI_THREAD_REQ_TERMINATE (1 << 1)
44 #define ABTI_THREAD_REQ_CANCEL (1 << 2)
45 #define ABTI_THREAD_REQ_MIGRATE (1 << 3)
46 #define ABTI_THREAD_REQ_BLOCK (1 << 4)
47 #define ABTI_THREAD_REQ_ORPHAN (1 << 5)
48 #define ABTI_THREAD_REQ_NON_YIELD \
49  (ABTI_THREAD_REQ_CANCEL | ABTI_THREAD_REQ_MIGRATE | \
50  ABTI_THREAD_REQ_TERMINATE | ABTI_THREAD_REQ_BLOCK | \
51  ABTI_THREAD_REQ_ORPHAN)
52 
53 #define ABTI_THREAD_INIT_ID 0xFFFFFFFFFFFFFFFF
54 #define ABTI_TASK_INIT_ID 0xFFFFFFFFFFFFFFFF
55 
56 #define ABTI_INDENT 4
57 
58 #define ABTI_UNIT_HASH_TABLE_SIZE_EXP 8 /* N -> 2^N table entries */
59 #define ABTI_UNIT_HASH_TABLE_SIZE ((size_t)(1 << ABTI_UNIT_HASH_TABLE_SIZE_EXP))
60 
61 #define ABTI_SCHED_CONFIG_HTABLE_SIZE 8
62 #define ABTI_SCHED_CONFIG_UNUSED_INDEX INT_MIN
63 
64 #define ABT_THREAD_TYPE_FULLY_FLEDGED 0
65 #define ABT_THREAD_TYPE_DYNAMIC_PROMOTION 1
66 
67 #define ABTI_STACK_CHECK_TYPE_NONE 0
68 #define ABTI_STACK_CHECK_TYPE_CANARY 1
69 
73 };
74 
79 };
80 
81 #define ABTI_THREAD_TYPE_EXT ((ABTI_thread_type)0)
82 #define ABTI_THREAD_TYPE_THREAD ((ABTI_thread_type)(0x1 << 0))
83 #define ABTI_THREAD_TYPE_ROOT ((ABTI_thread_type)(0x1 << 1))
84 #define ABTI_THREAD_TYPE_PRIMARY ((ABTI_thread_type)(0x1 << 2))
85 #define ABTI_THREAD_TYPE_MAIN_SCHED ((ABTI_thread_type)(0x1 << 3))
86 #define ABTI_THREAD_TYPE_YIELDABLE ((ABTI_thread_type)(0x1 << 4))
87 #define ABTI_THREAD_TYPE_NAMED ((ABTI_thread_type)(0x1 << 5))
88 #define ABTI_THREAD_TYPE_MIGRATABLE ((ABTI_thread_type)(0x1 << 6))
89 
90 #define ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC ((ABTI_thread_type)(0x1 << 7))
91 #define ABTI_THREAD_TYPE_MEM_MALLOC_DESC ((ABTI_thread_type)(0x1 << 8))
92 #define ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC_STACK ((ABTI_thread_type)(0x1 << 9))
93 #define ABTI_THREAD_TYPE_MEM_MALLOC_DESC_STACK ((ABTI_thread_type)(0x1 << 10))
94 
95 #define ABTI_THREAD_TYPES_MEM \
96  (ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC | ABTI_THREAD_TYPE_MEM_MALLOC_DESC | \
97  ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC_STACK | \
98  ABTI_THREAD_TYPE_MEM_MALLOC_DESC_STACK)
99 
100 /* ABTI_MUTEX_ATTR_NONE must be 0. See ABT_MUTEX_INITIALIZER. */
101 #define ABTI_MUTEX_ATTR_NONE 0
102 /* ABTI_MUTEX_ATTR_RECURSIVE must be 1. See ABT_RECURSIVE_MUTEX_INITIALIZER. */
103 #define ABTI_MUTEX_ATTR_RECURSIVE 1
104 
105 /* Macro functions */
106 #define ABTI_UNUSED(a) (void)(a)
107 
108 /* Data Types */
109 typedef struct ABTI_global ABTI_global;
110 typedef struct ABTI_local ABTI_local;
112 typedef struct ABTI_xstream ABTI_xstream;
114 typedef struct ABTI_sched ABTI_sched;
118 typedef void *ABTI_sched_id; /* Scheduler id */
119 typedef uintptr_t ABTI_sched_kind; /* Scheduler kind */
120 typedef struct ABTI_pool ABTI_pool;
122 typedef struct ABTI_thread ABTI_thread;
124 typedef struct ABTI_ythread ABTI_ythread;
126 typedef uint32_t ABTI_thread_type;
127 typedef struct ABTI_key ABTI_key;
128 typedef struct ABTI_ktelem ABTI_ktelem;
129 typedef struct ABTI_ktable ABTI_ktable;
132 typedef struct ABTI_mutex ABTI_mutex;
133 typedef struct ABTI_cond ABTI_cond;
134 typedef struct ABTI_rwlock ABTI_rwlock;
136 typedef struct ABTI_future ABTI_future;
137 typedef struct ABTI_barrier ABTI_barrier;
139 typedef struct ABTI_timer ABTI_timer;
140 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
142 #endif
143 /* ID associated with native thread (e.g, Pthreads), which can distinguish
144  * execution streams and external threads */
145 struct ABTI_native_thread_id_opaque;
146 typedef struct ABTI_native_thread_id_opaque *ABTI_native_thread_id;
147 /* ID associated with thread (i.e., ULTs, tasklets, and external threads) */
148 struct ABTI_thread_id_opaque;
149 typedef struct ABTI_thread_id_opaque *ABTI_thread_id;
150 /* Unit-to-thread hash table. */
153 
154 /* Architecture-Dependent Definitions */
155 #include "abtd.h"
156 
157 /* Basic data structure and memory pool. */
158 #include "abti_sync_lifo.h"
159 #include "abti_mem_pool.h"
160 
161 /* Definitions */
163 #ifndef ABT_CONFIG_ACTIVE_WAIT_POLICY
165 #endif
168 };
169 
171  int attrs; /* bit-or'ed attributes */
172 };
173 
174 struct ABTI_mutex {
175  int attrs; /* attributes copied from ABTI_mutex_attr. Check
176  * ABT_(RECURSIVE_)MUTEX_INITIALIZER to see how
177  * this variable can be initialized. */
178  ABTD_spinlock lock; /* lock */
179  int nesting_cnt; /* nesting count (if recursive) */
180  ABTI_thread_id owner_id; /* owner's ID (if recursive) */
181 #ifndef ABT_CONFIG_USE_SIMPLE_MUTEX
183  ABTI_waitlist waitlist; /* waiting list */
184 #endif
185 };
186 
189 };
190 
193  ABTD_spinlock lock; /* Protecting any list update. */
194 };
195 
196 struct ABTI_global {
197  int max_xstreams; /* Largest rank used in Argobots. */
198  int num_xstreams; /* Current # of ESs */
199  ABTI_xstream *p_xstream_head; /* List of ESs (head). The list is sorted. */
201  xstream_list_lock; /* Spinlock protecting ES list. Any read and
202  * write to this list requires a lock.*/
203 
204  int num_cores; /* Number of CPU cores */
205  ABT_bool set_affinity; /* Whether CPU affinity is used */
206  ABT_bool use_logging; /* Whether logging is used */
207  ABT_bool use_debug; /* Whether debug output is used */
208  uint32_t key_table_size; /* Default key table size */
209  size_t thread_stacksize; /* Default stack size for ULT (in bytes) */
210  size_t sched_stacksize; /* Default stack size for sched (in bytes) */
211  uint32_t sched_event_freq; /* Default check frequency for sched */
212  uint64_t sched_sleep_nsec; /* Default nanoseconds for scheduler sleep */
213  ABTI_ythread *p_primary_ythread; /* Primary ULT */
214 
215  uint32_t
216  mutex_max_handovers; /* Default max. # of local handovers (unused) */
217  uint32_t mutex_max_wakeups; /* Default max. # of wakeups (unused) */
218  size_t huge_page_size; /* Huge page size */
219 #ifdef ABT_CONFIG_USE_MEM_POOL
220  size_t mem_page_size; /* Page size for memory allocation */
221  size_t mem_sp_size; /* Stack page size */
222  uint32_t mem_max_stacks; /* Max. # of stacks kept in each ES */
223  uint32_t mem_max_descs; /* Max. # of descriptors kept in each ES */
224  int mem_lp_alloc; /* How to allocate large pages */
225 
226  ABTI_mem_pool_global_pool mem_pool_stack; /* Pool of stack (default size) */
227  ABTI_mem_pool_global_pool mem_pool_desc; /* Pool of descriptors that can
228  * store ABTI_task. */
229 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD
230  /* They are used for external threads. */
231  ABTD_spinlock mem_pool_stack_lock;
232  ABTI_mem_pool_local_pool mem_pool_stack_ext;
233  ABTD_spinlock mem_pool_desc_lock;
234  ABTI_mem_pool_local_pool mem_pool_desc_ext;
235 #endif
236 #endif
237 
238  ABT_bool print_config; /* Whether to print config on ABT_init */
239 
240 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
242 
246 #endif
247 
250  maps ABT_unit to
251  ABTI_thread */
252 };
253 
254 struct ABTI_local; /* Empty. */
255 
258  ABTI_local *(*get_local_f)(void);
260  void *(*get_local_ptr_f)(void);
262 };
263 
264 struct ABTI_xstream {
265  /* Linked list to manage all execution streams. */
268 
269  int rank; /* Rank */
271  ABTD_atomic_int state; /* State (ABT_xstream_state) */
272  ABTI_sched *p_main_sched; /* Main scheduler, which is the bottom of the
273  * linked list of schedulers */
274  ABTD_xstream_context ctx; /* ES context */
275 
277  *p_root_ythread; /* Root thread that schedulers the main scheduler. */
278  ABTI_pool *p_root_pool; /* Root pool that stores the main scheduler. */
279 
281  ABTI_thread *p_thread; /* Current running ULT/tasklet */
282 
283 #ifdef ABT_CONFIG_USE_MEM_POOL
284  ABTI_mem_pool_local_pool mem_pool_stack;
285  ABTI_mem_pool_local_pool mem_pool_desc;
286 #endif
287 };
288 
289 struct ABTI_sched {
290  ABTI_sched_used used; /* To know if it is used and how */
291  ABT_bool automatic; /* To know if automatic data free */
292  ABTI_sched_kind kind; /* Kind of the scheduler */
293  ABT_sched_type type; /* Can yield or not (ULT or task) */
294  ABTI_sched *p_replace_sched; /* Main scheduler that should replace this.
295  * ABTI_SCHED_REQ_REPLACE should be set. */
296  ABTI_ythread *p_replace_waiter; /* Thread waiting for replacement. */
298  ABT_pool *pools; /* Thread pools */
299  size_t num_pools; /* Number of thread pools */
300  ABTI_ythread *p_ythread; /* Associated ULT */
301  void *data; /* Data for a specific scheduler */
302 
303  /* Scheduler functions */
308 
309 #ifdef ABT_CONFIG_USE_DEBUG_LOG
310  uint64_t id; /* ID */
311 #endif
312 };
313 
315  int idx; /* Index of this element. */
316  ABT_sched_config_type type; /* Element type. */
317  char val[sizeof(double) > sizeof(void *)
318  ? sizeof(double)
319  : sizeof(void *)]; /* Memory for double, int, or pointer */
320  ABTI_sched_config_element *p_next; /* Next element. */
321 };
322 
325 };
326 
327 struct ABTI_pool {
328  ABT_pool_access access; /* Access mode */
329  ABT_bool automatic; /* To know if automatic data free */
330  ABT_bool is_builtin; /* Built-in pool. */
331  /* NOTE: int32_t to check if still positive */
332  ABTD_atomic_int32 num_scheds; /* Number of associated schedulers */
333  ABTD_atomic_int32 num_blocked; /* Number of blocked ULTs */
334  void *data; /* Specific data */
335  uint64_t id; /* ID */
336 
337  /* Functions to manage units */
341 
342  /* Functions to manage the pool */
352 };
353 
369 };
370 
371 struct ABTI_thread {
374  ABTD_atomic_int is_in_pool; /* Whether this thread is in a pool. */
375  ABTI_thread_type type; /* Thread type */
376  ABT_unit unit; /* Unit enclosing this thread */
377  ABTI_xstream *p_last_xstream; /* Last ES where it ran */
378  ABTI_thread *p_parent; /* Parent thread */
379  void (*f_thread)(void *); /* Thread function */
380  void *p_arg; /* Thread function argument */
381  ABTD_atomic_int state; /* State (ABT_thread_state) */
383  ABTI_pool *p_pool; /* Associated pool */
384  ABTD_atomic_ptr p_keytable; /* Thread-specific data (ABTI_ktable *) */
385  ABT_unit_id id; /* ID */
386 };
387 
389  void *p_stack; /* Stack address */
390  size_t stacksize; /* Stack size (in bytes) */
391  ABTI_thread_type thread_type; /* Thread type */
392 #ifndef ABT_CONFIG_DISABLE_MIGRATION
393  ABT_bool migratable; /* Migratability */
394  void (*f_cb)(ABT_thread, void *); /* Callback function */
395  void *p_cb_arg; /* Callback function argument */
396 #endif
397 };
398 
400  void (*f_migration_cb)(ABT_thread, void *); /* Callback function */
401  void *p_migration_cb_arg; /* Callback function argument */
403  p_migration_pool; /* Destination of migration (ABTI_pool *) */
404 };
405 
406 struct ABTI_ythread {
407  ABTI_thread thread; /* Common thread definition */
408  ABTD_ythread_context ctx; /* Context */
409  void *p_stack; /* Stack address */
410  size_t stacksize; /* Stack size (in bytes) */
411 };
412 
413 struct ABTI_key {
414  void (*f_destructor)(void *value);
415  uint32_t id;
416 };
417 
418 struct ABTI_ktelem {
419  /* information of ABTI_key */
420  void (*f_destructor)(void *value);
421  uint32_t key_id;
422  void *value;
423  ABTD_atomic_ptr p_next; /* Next element (ABTI_ktelem *) */
424 };
425 
426 struct ABTI_ktable {
427  int size; /* size of the table */
428  ABTD_spinlock lock; /* Protects any new entry creation. */
429  void *p_used_mem;
430  void *p_extra_mem;
432  ABTD_atomic_ptr p_elems[1]; /* element array (ABTI_ktelem *) */
433 };
434 
435 struct ABTI_cond {
439 };
440 
441 struct ABTI_rwlock {
444  size_t reader_count;
446 };
447 
451  void *value;
452  size_t nbytes;
454 };
455 
456 struct ABTI_future {
460  void **array;
461  void (*p_callback)(void **arg);
463 };
464 
465 struct ABTI_barrier {
466  size_t num_waiters;
467  volatile size_t counter;
470 };
471 
473  uint32_t num_waiters;
474 #ifdef HAVE_PTHREAD_BARRIER_INIT
476 #else
478  uint32_t counter;
480 #endif
481 };
482 
483 struct ABTI_timer {
484  ABTD_time start;
485  ABTD_time end;
486 };
487 
488 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
493  *p_parent; /* Parent of the target thread. Used to get the depth */
495  void *p_sync_object; /* ABTI type */
496 };
497 #endif
498 
499 /* Global Data */
502 
503 /* ES Local Data */
505 
506 /* Execution Stream (ES) */
508  ABTI_xstream **pp_xstream);
510  ABTI_xstream **pp_local_xstream,
511  ABTI_xstream *p_xstream,
512  ABTI_ythread *p_ythread);
513 void ABTI_xstream_free(ABTI_global *p_global, ABTI_local *p_local,
514  ABTI_xstream *p_xstream, ABT_bool force_free);
515 void ABTI_xstream_schedule(void *p_arg);
516 void ABTI_xstream_run_thread(ABTI_global *p_global,
517  ABTI_xstream **pp_local_xstream,
518  ABTI_thread *p_thread);
519 void ABTI_xstream_check_events(ABTI_xstream *p_xstream, ABTI_sched *p_sched);
520 void ABTI_xstream_print(ABTI_xstream *p_xstream, FILE *p_os, int indent,
521  ABT_bool print_sub);
522 
523 /* Scheduler */
528 void ABTI_sched_finish(ABTI_sched *p_sched);
529 void ABTI_sched_exit(ABTI_sched *p_sched);
530 ABTU_ret_err int ABTI_sched_create_basic(ABT_sched_predef predef, int num_pools,
531  ABT_pool *pools,
532  ABTI_sched_config *p_config,
533  ABTI_sched **pp_newsched);
534 void ABTI_sched_free(ABTI_global *p_global, ABTI_local *p_local,
535  ABTI_sched *p_sched, ABT_bool force_free);
537  ABTI_pool **);
539 size_t ABTI_sched_get_size(ABTI_sched *p_sched);
540 size_t ABTI_sched_get_total_size(ABTI_sched *p_sched);
541 size_t ABTI_sched_get_effective_size(ABTI_local *p_local, ABTI_sched *p_sched);
542 void ABTI_sched_print(ABTI_sched *p_sched, FILE *p_os, int indent,
543  ABT_bool print_sub);
544 void ABTI_sched_reset_id(void);
545 
546 /* Scheduler config */
548  int idx, void *p_val);
549 
550 /* Pool */
552  ABT_pool_access access,
553  ABT_bool automatic,
554  ABTI_pool **pp_newpool);
555 void ABTI_pool_free(ABTI_pool *p_pool);
557  ABTI_pool_def *p_def);
559  ABTI_pool_def *p_def);
560 void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent);
561 void ABTI_pool_reset_id(void);
562 
563 /* Work Unit */
564 void ABTI_unit_init_hash_table(ABTI_global *p_global);
567  ABTI_thread *p_thread);
568 void ABTI_unit_unmap_thread(ABTI_global *p_global, ABT_unit unit);
570  ABT_unit unit);
571 /* Threads */
573  ABTI_local *p_local,
574  ABTI_thread *p_thread,
575  ABTI_thread_mig_data **pp_mig_data);
576 ABTU_ret_err int ABTI_thread_revive(ABTI_global *p_global, ABTI_local *p_local,
577  ABTI_pool *p_pool,
578  void (*thread_func)(void *), void *arg,
579  ABTI_thread *p_thread);
580 void ABTI_thread_join(ABTI_local **pp_local, ABTI_thread *p_thread);
581 void ABTI_thread_free(ABTI_global *p_global, ABTI_local *p_local,
582  ABTI_thread *p_thread);
583 void ABTI_thread_print(ABTI_thread *p_thread, FILE *p_os, int indent);
584 void ABTI_thread_reset_id(void);
586 
587 /* Yieldable threads */
589  ABTI_local *p_local,
590  ABTI_xstream *p_xstream,
591  ABTI_ythread **pp_root_ythread);
593  ABTI_local *p_local,
594  ABTI_xstream *p_xstream,
595  ABTI_ythread **p_ythread);
597  ABTI_local *p_local,
598  ABTI_xstream *p_xstream,
599  ABTI_sched *p_sched);
601  ABTI_local *p_local,
602  ABTI_pool *p_pool,
603  ABTI_sched *p_sched);
604 ABTU_noreturn void ABTI_ythread_exit(ABTI_xstream *p_local_xstream,
605  ABTI_ythread *p_ythread);
606 void ABTI_ythread_free_primary(ABTI_global *p_global, ABTI_local *p_local,
607  ABTI_ythread *p_ythread);
608 void ABTI_ythread_free_root(ABTI_global *p_global, ABTI_local *p_local,
609  ABTI_ythread *p_ythread);
610 void ABTI_ythread_set_blocked(ABTI_ythread *p_ythread);
611 void ABTI_ythread_suspend(ABTI_xstream **pp_local_xstream,
612  ABTI_ythread *p_ythread,
613  ABT_sync_event_type sync_event_type, void *p_sync);
614 void ABTI_ythread_set_ready(ABTI_local *p_local, ABTI_ythread *p_ythread);
615 void ABTI_ythread_print_stack(ABTI_ythread *p_ythread, FILE *p_os);
616 
617 /* Thread attributes */
618 void ABTI_thread_attr_print(ABTI_thread_attr *p_attr, FILE *p_os, int indent);
619 ABTU_ret_err int
621  ABTI_thread_attr **pp_dup_attr) ABTU_ret_err;
622 
623 /* Key */
624 void ABTI_ktable_free(ABTI_global *p_global, ABTI_local *p_local,
625  ABTI_ktable *p_ktable);
626 
627 /* Information */
628 void ABTI_info_print_config(ABTI_global *p_global, FILE *fp);
630 
631 #include "abti_timer.h"
632 #include "abti_log.h"
633 #include "abti_local.h"
634 #include "abti_global.h"
635 #include "abti_self.h"
636 #include "abti_pool.h"
637 #include "abti_sched.h"
638 #include "abti_config.h"
639 #include "abti_stream.h"
640 #include "abti_thread.h"
641 #include "abti_unit.h"
642 #include "abti_tool.h"
643 #include "abti_ythread.h"
644 #include "abti_thread_attr.h"
645 #include "abti_waitlist.h"
646 #include "abti_mutex.h"
647 #include "abti_mutex_attr.h"
648 #include "abti_cond.h"
649 #include "abti_rwlock.h"
650 #include "abti_eventual.h"
651 #include "abti_future.h"
652 #include "abti_barrier.h"
653 #include "abti_stream_barrier.h"
654 #include "abti_mem.h"
655 #include "abti_key.h"
656 
657 #endif /* ABTI_H_INCLUDED */
ABT_pool_pop_fn
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
Definition: abt.h:1414
ABTI_pool_def::p_init
ABT_pool_init_fn p_init
Definition: abti.h:360
ABTI_key
Definition: abti.h:413
gp_ABTI_local_func
ABTI_local_func gp_ABTI_local_func
Definition: local.c:23
ABTI_pool_def::p_get_size
ABT_pool_get_size_fn p_get_size
Definition: abti.h:361
ABTI_eventual::ready
ABT_bool ready
Definition: abti.h:450
ABTI_global::tool_writer_lock
ABTD_spinlock tool_writer_lock
Definition: abti.h:241
ABT_sched_predef
ABT_sched_predef
Predefined scheduler type.
Definition: abt.h:465
ABTI_sched::data
void * data
Definition: abti.h:301
ABTI_SCHED_CONFIG_HTABLE_SIZE
#define ABTI_SCHED_CONFIG_HTABLE_SIZE
Definition: abti.h:61
ABTI_barrier::counter
volatile size_t counter
Definition: abti.h:467
ABTI_pool::num_blocked
ABTD_atomic_int32 num_blocked
Definition: abti.h:333
ABTI_xstream::ctx
ABTD_xstream_context ctx
Definition: abti.h:274
ABTI_waitlist::futex
ABTD_futex_multiple futex
Definition: abti.h:164
ABTI_global::sched_sleep_nsec
uint64_t sched_sleep_nsec
Definition: abti.h:212
abti_global.h
abti_ythread.h
ABTI_thread_mig_data::f_migration_cb
void(* f_migration_cb)(ABT_thread, void *)
Definition: abti.h:400
ABT_bool
int ABT_bool
Boolean type.
Definition: abt.h:1001
ABTI_global::sched_stacksize
size_t sched_stacksize
Definition: abti.h:210
ABTI_sched_config_element::val
char val[sizeof(double) > sizeof(void *) ? sizeof(double) :sizeof(void *)]
Definition: abti.h:319
ABTI_XSTREAM_TYPE_PRIMARY
@ ABTI_XSTREAM_TYPE_PRIMARY
Definition: abti.h:71
ABTI_future::array
void ** array
Definition: abti.h:460
abti_thread_attr.h
ABTI_sched_config::elements
ABTI_sched_config_element elements[ABTI_SCHED_CONFIG_HTABLE_SIZE]
Definition: abti.h:324
abti_key.h
ABTI_ktable::lock
ABTD_spinlock lock
Definition: abti.h:428
ABTI_sched_get_total_size
size_t ABTI_sched_get_total_size(ABTI_sched *p_sched)
Definition: sched.c:912
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:655
ABTI_unit_to_thread_entry::lock
ABTD_spinlock lock
Definition: abti.h:193
ABT_unit_is_in_pool_fn
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
Definition: abt.h:1407
ABTI_SCHED_NOT_USED
@ ABTI_SCHED_NOT_USED
Definition: abti.h:76
ABTD_atomic_int
Definition: abtd_atomic.h:15
abti_rwlock.h
ABTI_pool::p_print_all
ABT_pool_print_all_fn p_print_all
Definition: abti.h:351
abti_sched.h
ABTD_atomic_uint64
Definition: abtd_atomic.h:35
ABT_sched_run_fn
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:1293
abti_cond.h
ABTI_pool_def::p_remove
ABT_pool_remove_fn p_remove
Definition: abti.h:366
ABT_thread
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
Definition: abt.h:890
ABTI_thread_mig_data::p_migration_pool
ABTD_atomic_ptr p_migration_pool
Definition: abti.h:403
ABTI_pool_def::p_print_all
ABT_pool_print_all_fn p_print_all
Definition: abti.h:368
ABTI_mem_pool_local_pool
Definition: abti_mem_pool.h:90
abti_thread.h
ABTI_global::xstream_list_lock
ABTD_spinlock xstream_list_lock
Definition: abti.h:201
ABTI_xstream_schedule
void ABTI_xstream_schedule(void *p_arg)
ABTI_future
Definition: abti.h:456
ABTI_pool_def
Definition: abti.h:354
ABTI_thread::type
ABTI_thread_type type
Definition: abti.h:375
ABTI_barrier::waitlist
ABTI_waitlist waitlist
Definition: abti.h:469
ABTI_thread_attr::migratable
ABT_bool migratable
Definition: abti.h:393
ABTI_xstream_barrier::lock
ABTD_spinlock lock
Definition: abti.h:477
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:2257
ABTI_sched_exit
void ABTI_sched_exit(ABTI_sched *p_sched)
Definition: sched.c:650
ABTI_mutex_attr::attrs
int attrs
Definition: abti.h:171
ABTI_sched_used
ABTI_sched_used
Definition: abti.h:75
abti_log.h
ABTI_eventual
Definition: abti.h:448
ABTI_pool_reset_id
void ABTI_pool_reset_id(void)
Definition: pool.c:950
ABTD_xstream_context
Definition: abtd.h:24
ABTI_xstream_barrier
Definition: abti.h:472
ABTI_thread_print
void ABTI_thread_print(ABTI_thread *p_thread, FILE *p_os, int indent)
Definition: thread.c:2461
ABTI_rwlock::reader_count
size_t reader_count
Definition: abti.h:444
ABTI_ythread::stacksize
size_t stacksize
Definition: abti.h:410
abti_stream.h
ABTI_atomic_unit_to_thread
Definition: abti.h:187
ABT_pool_pop_wait_fn
ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)
Definition: abt.h:1415
ABTI_sched::num_pools
size_t num_pools
Definition: abti.h:299
ABTI_thread::p_next
ABTI_thread * p_next
Definition: abti.h:373
ABTI_sched::automatic
ABT_bool automatic
Definition: abti.h:291
ABTI_xstream::rank
int rank
Definition: abti.h:269
gp_ABTI_global
ABTI_global * gp_ABTI_global
Definition: global.c:18
ABTI_thread::p_arg
void * p_arg
Definition: abti.h:380
abti_timer.h
ABTI_local_func
Definition: abti.h:256
ABTI_waitlist::p_tail
ABTI_thread * p_tail
Definition: abti.h:167
ABTU_noreturn
#define ABTU_noreturn
Definition: abtu.h:118
ABTI_thread::unit
ABT_unit unit
Definition: abti.h:376
ABTI_xstream::type
ABTI_xstream_type type
Definition: abti.h:270
ABTI_thread::request
ABTD_atomic_uint32 request
Definition: abti.h:382
ABTI_timer::end
ABTD_time end
Definition: abti.h:485
ABTI_tool_context
Definition: abti.h:489
abti_barrier.h
ABTI_pool::automatic
ABT_bool automatic
Definition: abti.h:329
ABTI_thread_get_id
ABT_unit_id ABTI_thread_get_id(ABTI_thread *p_thread)
Definition: thread.c:2561
ABTI_ktable::extra_mem_size
size_t extra_mem_size
Definition: abti.h:431
ABTI_global::print_config
ABT_bool print_config
Definition: abti.h:238
ABTI_thread_mig_data
Definition: abti.h:399
ABTI_global::tool_thread_cb_f
ABT_tool_thread_callback_fn tool_thread_cb_f
Definition: abti.h:243
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:2400
abtd.h
ABTI_future::counter
ABTD_atomic_size counter
Definition: abti.h:458
ABTI_pool::u_create_from_thread
ABT_unit_create_from_thread_fn u_create_from_thread
Definition: abti.h:339
ABTI_mutex::lock
ABTD_spinlock lock
Definition: abti.h:178
ABTI_eventual::nbytes
size_t nbytes
Definition: abti.h:452
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:2300
ABT_pool_pop_timedwait_fn
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
Definition: abt.h:1416
ABTI_unit_unmap_thread
void ABTI_unit_unmap_thread(ABTI_global *p_global, ABT_unit unit)
Definition: unit.c:107
ABTI_thread
Definition: abti.h:371
ABTI_pool_get_fifo_def
ABTU_ret_err int ABTI_pool_get_fifo_def(ABT_pool_access access, ABTI_pool_def *p_def)
Definition: fifo.c:68
ABT_sched_type
ABT_sched_type
Scheduler's work unit type.
Definition: abt.h:490
ABTI_barrier
Definition: abti.h:465
ABTI_xstream
Definition: abti.h:264
ABTD_ythread_context
Definition: abtd_fcontext.h:33
ABT_pool_print_all_fn
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:1419
abti_future.h
ABTI_future::num_compartments
size_t num_compartments
Definition: abti.h:459
ABTI_pool::p_push
ABT_pool_push_fn p_push
Definition: abti.h:345
ABTI_sched_config
Definition: abti.h:323
ABT_pool
struct ABT_pool_opaque * ABT_pool
Pool handle type.
Definition: abt.h:841
ABTI_sched_has_to_stop
ABT_bool ABTI_sched_has_to_stop(ABTI_local **pp_local, ABTI_sched *p_sched)
Definition: sched.c:871
ABTD_spinlock
Definition: abtd_spinlock.h:9
ABTI_sched::p_ythread
ABTI_ythread * p_ythread
Definition: abti.h:300
ABTI_mutex::attrs
int attrs
Definition: abti.h:175
ABTI_waitlist
Definition: abti.h:162
ABTI_sched::type
ABT_sched_type type
Definition: abti.h:293
ABTI_pool_def::u_free
ABT_unit_free_fn u_free
Definition: abti.h:359
ABTI_xstream::p_next
ABTI_xstream * p_next
Definition: abti.h:267
ABTI_SCHED_IN_POOL
@ ABTI_SCHED_IN_POOL
Definition: abti.h:78
ABTI_thread_attr_print
void ABTI_thread_attr_print(ABTI_thread_attr *p_attr, FILE *p_os, int indent)
Definition: thread_attr.c:369
ABTI_thread_attr
Definition: abti.h:388
ABTI_sched::used
ABTI_sched_used used
Definition: abti.h:290
ABTI_pool
Definition: abti.h:327
ABT_unit_free_fn
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:1410
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:435
ABTI_mutex::waitlist
ABTI_waitlist waitlist
Definition: abti.h:183
ABTI_tool_context::p_parent
ABTI_thread * p_parent
Definition: abti.h:493
ABTI_xstream_barrier::num_waiters
uint32_t num_waiters
Definition: abti.h:473
ABTI_pool_def::u_is_in_pool
ABT_unit_is_in_pool_fn u_is_in_pool
Definition: abti.h:357
ABTI_tool_context::p_sync_object
void * p_sync_object
Definition: abti.h:495
ABT_sync_event_type
ABT_sync_event_type
Type of synchronization event.
Definition: abt.h:660
ABTI_rwlock::write_flag
int write_flag
Definition: abti.h:445
ABTI_global::use_logging
ABT_bool use_logging
Definition: abti.h:206
ABTI_pool_free
void ABTI_pool_free(ABTI_pool *p_pool)
Definition: pool.c:891
ABTI_pool::is_builtin
ABT_bool is_builtin
Definition: abti.h:330
ABTI_info_check_print_all_thread_stacks
void ABTI_info_check_print_all_thread_stacks(void)
Definition: info.c:939
ABTI_timer
Definition: abti.h:483
ABTI_ythread_exit
ABTU_noreturn void ABTI_ythread_exit(ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread)
Definition: thread.c:2425
ABTI_pool::data
void * data
Definition: abti.h:334
ABTI_ythread_free_root
void ABTI_ythread_free_root(ABTI_global *p_global, ABTI_local *p_local, ABTI_ythread *p_ythread)
Definition: thread.c:2419
ABTI_ktable::p_extra_mem
void * p_extra_mem
Definition: abti.h:430
ABT_unit_id
uint64_t ABT_unit_id
Work unit ID type.
Definition: abt.h:879
ABTI_global::unit_to_thread_entires
ABTI_unit_to_thread_entry unit_to_thread_entires[ABTI_UNIT_HASH_TABLE_SIZE]
Definition: abti.h:249
ABTI_rwlock
Definition: abti.h:441
ABT_pool_remove_fn
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1417
ABT_pool_init_fn
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:1411
ABTI_thread::state
ABTD_atomic_int state
Definition: abti.h:381
ABTI_pool::u_is_in_pool
ABT_unit_is_in_pool_fn u_is_in_pool
Definition: abti.h:338
ABTI_global::thread_stacksize
size_t thread_stacksize
Definition: abti.h:209
ABTI_sched_id
void * ABTI_sched_id
Definition: abti.h:118
ABTI_pool::p_pop_wait
ABT_pool_pop_wait_fn p_pop_wait
Definition: abti.h:347
ABTI_pool::p_pop
ABT_pool_pop_fn p_pop
Definition: abti.h:346
ABTI_barrier::num_waiters
size_t num_waiters
Definition: abti.h:466
ABTD_atomic_int32
Definition: abtd_atomic.h:23
ABTI_global::huge_page_size
size_t huge_page_size
Definition: abti.h:218
ABTI_tool_context::sync_event_type
ABT_sync_event_type sync_event_type
Definition: abti.h:494
ABTI_timer::start
ABTD_time start
Definition: abti.h:484
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:1584
ABTI_sched_finish
void ABTI_sched_finish(ABTI_sched *p_sched)
Definition: sched.c:645
ABTI_sched::free
ABT_sched_free_fn free
Definition: abti.h:306
ABTD_atomic_ptr
Definition: abtd_atomic.h:39
abti_stream_barrier.h
abti_unit.h
ABTI_unit_finalize_hash_table
void ABTI_unit_finalize_hash_table(ABTI_global *p_global)
Definition: unit.c:96
ABTI_eventual::lock
ABTD_spinlock lock
Definition: abti.h:449
ABTI_sched_config_element::type
ABT_sched_config_type type
Definition: abti.h:316
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:858
ABTI_xstream::p_main_sched
ABTI_sched * p_main_sched
Definition: abti.h:272
ABTI_pool::p_remove
ABT_pool_remove_fn p_remove
Definition: abti.h:349
ABT_sched_init_fn
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
Definition: abt.h:1292
ABTI_thread_mig_data::p_migration_cb_arg
void * p_migration_cb_arg
Definition: abti.h:401
ABTI_sched_get_migration_pool
ABTU_ret_err int ABTI_sched_get_migration_pool(ABTI_sched *, ABTI_pool *, ABTI_pool **)
Definition: sched.c:895
ABTI_thread_attr::p_cb_arg
void * p_cb_arg
Definition: abti.h:395
ABTI_sched::get_migr_pool
ABT_sched_get_migr_pool_fn get_migr_pool
Definition: abti.h:307
abti_mem.h
ABTI_global::sched_event_freq
uint32_t sched_event_freq
Definition: abti.h:211
abti_config.h
ABTI_XSTREAM_TYPE_SECONDARY
@ ABTI_XSTREAM_TYPE_SECONDARY
Definition: abti.h:72
ABTD_futex_multiple
Definition: abtd_futex.h:75
ABTI_rwlock::cond
ABTI_cond cond
Definition: abti.h:443
ABTI_sched_reset_id
void ABTI_sched_reset_id(void)
Definition: sched.c:1033
ABTI_thread_join
void ABTI_thread_join(ABTI_local **pp_local, ABTI_thread *p_thread)
Definition: thread.c:2395
ABTI_ktelem::value
void * value
Definition: abti.h:422
ABTI_sched_config_element::idx
int idx
Definition: abti.h:315
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: config.c:259
ABT_unit
struct ABT_unit_opaque * ABT_unit
Work unit handle type for scheduling.
Definition: abt.h:869
ABTI_global::tool_thread_user_arg
void * tool_thread_user_arg
Definition: abti.h:244
ABTI_sched_get_randws_def
ABT_sched_def * ABTI_sched_get_randws_def(void)
Definition: randws.c:31
abt_config.h
ABTI_mutex::waiter_lock
ABTD_spinlock waiter_lock
Definition: abti.h:182
ABTI_ythread::ctx
ABTD_ythread_context ctx
Definition: abti.h:408
ABTI_xstream_print
void ABTI_xstream_print(ABTI_xstream *p_xstream, FILE *p_os, int indent, ABT_bool print_sub)
Definition: stream.c:1620
ABTI_pool_def::u_create_from_thread
ABT_unit_create_from_thread_fn u_create_from_thread
Definition: abti.h:358
ABTI_global::mutex_max_handovers
uint32_t mutex_max_handovers
Definition: abti.h:216
ABTI_cond::p_waiter_mutex
ABTI_mutex * p_waiter_mutex
Definition: abti.h:437
ABTI_atomic_unit_to_thread::val
ABTD_atomic_ptr val
Definition: abti.h:188
ABTI_pool_def::p_push
ABT_pool_push_fn p_push
Definition: abti.h:362
ABTI_pool_def::p_pop_timedwait
ABT_pool_pop_timedwait_fn p_pop_timedwait
Definition: abti.h:365
ABTI_sched::pools
ABT_pool * pools
Definition: abti.h:298
ABTI_sched::p_replace_sched
ABTI_sched * p_replace_sched
Definition: abti.h:294
ABTI_pool::p_get_size
ABT_pool_get_size_fn p_get_size
Definition: abti.h:344
ABTI_thread::is_in_pool
ABTD_atomic_int is_in_pool
Definition: abti.h:374
ABTI_xstream_barrier::counter
uint32_t counter
Definition: abti.h:478
ABT_CONFIG_STATIC_CACHELINE_SIZE
#define ABT_CONFIG_STATIC_CACHELINE_SIZE
Definition: abt_config.h:72
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:112
ABTI_xstream::state
ABTD_atomic_int state
Definition: abti.h:271
ABTI_global::num_xstreams
int num_xstreams
Definition: abti.h:198
ABTI_pool::u_free
ABT_unit_free_fn u_free
Definition: abti.h:340
ABTI_unit_init_hash_table
void ABTI_unit_init_hash_table(ABTI_global *p_global)
Definition: unit.c:91
ABTI_tool_context::p_pool
ABTI_pool * p_pool
Definition: abti.h:491
ABTI_pool::p_init
ABT_pool_init_fn p_init
Definition: abti.h:343
ABTI_global::p_primary_ythread
ABTI_ythread * p_primary_ythread
Definition: abti.h:213
ABTI_mutex::nesting_cnt
int nesting_cnt
Definition: abti.h:179
ABTI_local_func::padding2
char padding2[ABT_CONFIG_STATIC_CACHELINE_SIZE]
Definition: abti.h:261
ABTI_xstream::p_root_pool
ABTI_pool * p_root_pool
Definition: abti.h:278
ABTI_xstream_check_events
void ABTI_xstream_check_events(ABTI_xstream *p_xstream, ABTI_sched *p_sched)
Definition: stream.c:1568
abti_valgrind.h
ABTU_ret_err
#define ABTU_ret_err
Definition: abtu.h:146
ABTI_pool_def::p_free
ABT_pool_free_fn p_free
Definition: abti.h:367
ABTI_thread_attr::stacksize
size_t stacksize
Definition: abti.h:390
ABTI_sched_config_element::p_next
ABTI_sched_config_element * p_next
Definition: abti.h:320
ABTI_tool_context::p_caller
ABTI_thread * p_caller
Definition: abti.h:490
ABTI_local_func::padding1
char padding1[ABT_CONFIG_STATIC_CACHELINE_SIZE]
Definition: abti.h:257
ABTI_thread_id
struct ABTI_thread_id_opaque * ABTI_thread_id
Definition: abti.h:149
ABTI_pool_def::p_pop_wait
ABT_pool_pop_wait_fn p_pop_wait
Definition: abti.h:364
abt.h
ABTI_global::p_xstream_head
ABTI_xstream * p_xstream_head
Definition: abti.h:199
ABTI_sched::kind
ABTI_sched_kind kind
Definition: abti.h:292
ABTI_ythread_set_blocked
void ABTI_ythread_set_blocked(ABTI_ythread *p_ythread)
Definition: ythread.c:23
ABT_unit_get_thread_fn
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
Definition: abt.h:1405
ABTI_local_func::set_local_xstream_f
void(* set_local_xstream_f)(ABTI_xstream *)
Definition: abti.h:259
ABTI_SCHED_MAIN
@ ABTI_SCHED_MAIN
Definition: abti.h:77
ABTI_pool::p_free
ABT_pool_free_fn p_free
Definition: abti.h:350
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:413
ABTI_global::mutex_max_wakeups
uint32_t mutex_max_wakeups
Definition: abti.h:217
ABTI_sched::run
ABT_sched_run_fn run
Definition: abti.h:305
ABT_pool_push_fn
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:1413
ABTI_thread_type
uint32_t ABTI_thread_type
Definition: abti.h:126
ABTI_ktelem::key_id
uint32_t key_id
Definition: abti.h:421
ABTI_sched::request
ABTD_atomic_uint32 request
Definition: abti.h:297
ABTI_mem_pool_global_pool
Definition: abti_mem_pool.h:49
abti_waitlist.h
ABTI_global::key_table_size
uint32_t key_table_size
Definition: abti.h:208
abti_sync_lifo.h
ABTI_ktable
Definition: abti.h:426
ABTI_waitlist::p_head
ABTI_thread * p_head
Definition: abti.h:166
ABTI_future::lock
ABTD_spinlock lock
Definition: abti.h:457
ABTI_global::tool_thread_event_mask_tagged
ABTD_atomic_uint64 tool_thread_event_mask_tagged
Definition: abti.h:245
ABTI_key::id
uint32_t id
Definition: abti.h:415
ABTI_sched
Definition: abti.h:289
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:1525
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:2328
ABTI_xstream::p_root_ythread
ABTI_ythread * p_root_ythread
Definition: abti.h:277
ABTI_ythread
Definition: abti.h:406
ABTI_sched_kind
uintptr_t ABTI_sched_kind
Definition: abti.h:119
ABTI_sched_config_element
Definition: abti.h:314
ABTI_pool::access
ABT_pool_access access
Definition: abti.h:328
ABTI_pool_def::p_pop
ABT_pool_pop_fn p_pop
Definition: abti.h:363
abti_mem_pool.h
ABTI_unit_to_thread_entry::list
ABTI_atomic_unit_to_thread list
Definition: abti.h:192
ABTI_ythread_set_ready
void ABTI_ythread_set_ready(ABTI_local *p_local, ABTI_ythread *p_ythread)
Definition: ythread.c:65
ABTI_ktable::size
int size
Definition: abti.h:427
ABTI_mutex_attr
Definition: abti.h:170
ABTI_eventual::value
void * value
Definition: abti.h:451
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:2410
ABTD_atomic_size
Definition: abtd_atomic.h:19
ABTI_ythread_suspend
void ABTI_ythread_suspend(ABTI_xstream **pp_local_xstream, ABTI_ythread *p_ythread, ABT_sync_event_type sync_event_type, void *p_sync)
Definition: ythread.c:45
ABTI_eventual::waitlist
ABTI_waitlist waitlist
Definition: abti.h:453
ABTI_ktelem
Definition: abti.h:418
abti_eventual.h
ABTI_thread::p_parent
ABTI_thread * p_parent
Definition: abti.h:378
ABTI_ktelem::f_destructor
void(* f_destructor)(void *value)
Definition: abti.h:420
ABT_sched_def
A struct that defines a scheduler.
Definition: abt.h:1302
lp_ABTI_local
ABTD_XSTREAM_LOCAL ABTI_local * lp_ABTI_local
Definition: local.c:29
ABTI_cond::lock
ABTD_spinlock lock
Definition: abti.h:436
ABTI_xstream_run_thread
void ABTI_xstream_run_thread(ABTI_global *p_global, ABTI_xstream **pp_local_xstream, ABTI_thread *p_thread)
Definition: stream.c:1554
ABTI_future::waitlist
ABTI_waitlist waitlist
Definition: abti.h:462
ABTI_barrier::lock
ABTD_spinlock lock
Definition: abti.h:468
ABTI_rwlock::mutex
ABTI_mutex mutex
Definition: abti.h:442
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:2355
ABTI_UNIT_HASH_TABLE_SIZE
#define ABTI_UNIT_HASH_TABLE_SIZE
Definition: abti.h:59
ABT_sched_get_migr_pool_fn
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
Definition: abt.h:1296
ABTI_global::use_debug
ABT_bool use_debug
Definition: abti.h:207
ABTI_thread::p_last_xstream
ABTI_xstream * p_last_xstream
Definition: abti.h:377
ABT_pool_get_size_fn
size_t(* ABT_pool_get_size_fn)(ABT_pool)
Definition: abt.h:1412
ABTI_ktable::p_used_mem
void * p_used_mem
Definition: abti.h:429
ABTI_sched::init
ABT_sched_init_fn init
Definition: abti.h:304
ABTI_xstream_barrier::tag
ABTD_atomic_uint64 tag
Definition: abti.h:479
ABTI_thread_attr::p_stack
void * p_stack
Definition: abti.h:389
ABTI_ythread::p_stack
void * p_stack
Definition: abti.h:409
ABTI_pool_get_fifo_wait_def
ABTU_ret_err int ABTI_pool_get_fifo_wait_def(ABT_pool_access access, ABTI_pool_def *p_def)
Definition: fifo_wait.c:39
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:834
ABTI_ktelem::p_next
ABTD_atomic_ptr p_next
Definition: abti.h:423
ABTI_ythread_print_stack
void ABTI_ythread_print_stack(ABTI_ythread *p_ythread, FILE *p_os)
Definition: ythread.c:100
ABTI_thread::p_keytable
ABTD_atomic_ptr p_keytable
Definition: abti.h:384
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:2436
ABTI_ythread::thread
ABTI_thread thread
Definition: abti.h:407
ABTI_thread_attr::thread_type
ABTI_thread_type thread_type
Definition: abti.h:391
ABTI_thread::p_prev
ABTI_thread * p_prev
Definition: abti.h:372
ABTI_local
struct ABTI_local ABTI_local
Definition: abti.h:110
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:394
ABT_pool_free_fn
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:1418
ABTI_global::set_affinity
ABT_bool set_affinity
Definition: abti.h:205
ABTI_ktable::p_elems
ABTD_atomic_ptr p_elems[1]
Definition: abti.h:432
ABTI_pool_print
void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent)
Definition: pool.c:901
ABTI_pool::id
uint64_t id
Definition: abti.h:335
abti_mutex_attr.h
ABTI_global
Definition: abti.h:196
ABTI_thread::f_thread
void(* f_thread)(void *)
Definition: abti.h:379
abtu.h
ABTI_pool_def::u_get_thread
ABT_unit_get_thread_fn u_get_thread
Definition: abti.h:356
ABTI_ktable_free
void ABTI_ktable_free(ABTI_global *p_global, ABTI_local *p_local, ABTI_ktable *p_ktable)
Definition: key.c:232
ABTI_thread_reset_id
void ABTI_thread_reset_id(void)
Definition: thread.c:2556
ABTI_pool_def::access
ABT_pool_access access
Definition: abti.h:355
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:1683
ABTI_thread::p_pool
ABTI_pool * p_pool
Definition: abti.h:383
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:2376
ABTI_global::num_cores
int num_cores
Definition: abti.h:204
ABTI_xstream::p_prev
ABTI_xstream * p_prev
Definition: abti.h:266
abti_error.h
ABTI_xstream_type
ABTI_xstream_type
Definition: abti.h:70
ABTI_native_thread_id
struct ABTI_native_thread_id_opaque * ABTI_native_thread_id
Definition: abti.h:146
ABTI_sched_get_size
size_t ABTI_sched_get_size(ABTI_sched *p_sched)
Definition: sched.c:633
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:101
ABT_sched_free_fn
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:1294
ABTI_xstream_create_primary
ABTU_ret_err int ABTI_xstream_create_primary(ABTI_global *p_global, ABTI_xstream **pp_xstream)
Definition: stream.c:1500
ABT_pool_kind
ABT_pool_kind
Predefined pool type.
Definition: abt.h:504
ABTI_future::p_callback
void(* p_callback)(void **arg)
Definition: abti.h:461
ABTD_xstream_barrier
void * ABTD_xstream_barrier
Definition: abtd.h:36
ABTI_sched::p_replace_waiter
ABTI_ythread * p_replace_waiter
Definition: abti.h:296
ABTI_cond::waitlist
ABTI_waitlist waitlist
Definition: abti.h:438
ABTI_pool::num_scheds
ABTD_atomic_int32 num_scheds
Definition: abti.h:332
ABTI_global::max_xstreams
int max_xstreams
Definition: abti.h:197
abti_self.h
ABTI_thread::id
ABT_unit_id id
Definition: abti.h:385
ABTI_pool::p_pop_timedwait
ABT_pool_pop_timedwait_fn p_pop_timedwait
Definition: abti.h:348
ABTI_sched_get_effective_size
size_t ABTI_sched_get_effective_size(ABTI_local *p_local, ABTI_sched *p_sched)
Definition: sched.c:929
abti_local.h
ABTI_info_print_config
void ABTI_info_print_config(ABTI_global *p_global, FILE *fp)
Definition: info.c:1010
ABTI_unit_to_thread_entry
Definition: abti.h:191
ABTI_sched_get_prio_def
ABT_sched_def * ABTI_sched_get_prio_def(void)
Definition: prio.c:29
ABTI_mutex::owner_id
ABTI_thread_id owner_id
Definition: abti.h:180
ABTI_mutex
Definition: abti.h:174
ABTI_key::f_destructor
void(* f_destructor)(void *value)
Definition: abti.h:414
ABT_unit_create_from_thread_fn
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
Definition: abt.h:1408
ABT_sched_config_type
ABT_sched_config_type
A struct that sets and gets a scheduler configuration.
Definition: abt.h:1227
ABT_pool_access
ABT_pool_access
Pool access type.
Definition: abt.h:522
ABTI_sched_print
void ABTI_sched_print(ABTI_sched *p_sched, FILE *p_os, int indent, ABT_bool print_sub)
Definition: sched.c:959
abti_mutex.h