ARGOBOTS  1059a7c2eb7e3f99f736a9c3a4f6ea476ac1b804
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
abt.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 ABT_H_INCLUDED
7 #define ABT_H_INCLUDED
8 
9 /* user include file for ARGOBOTS programs */
10 
11 #if defined(ABT_C_HAVE_VISIBILITY)
12 #define ABT_API_PUBLIC __attribute__((visibility ("default")))
13 #else
14 #define ABT_API_PUBLIC
15 #endif
16 
17 /* Keep C++ compilers from getting confused */
18 #if defined(__cplusplus)
19 extern "C" {
20 #endif
21 
22 #include <stdio.h>
23 #include <stddef.h>
24 #include <stdint.h>
25 #include <sys/time.h>
26 
27 /* ABT_VERSION is the version string. ABT_NUMVERSION is the
28  * numeric version that can be used in numeric comparisons.
29  *
30  * ABT_VERSION uses the following format:
31  * Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER]
32  * Example: 1.0.7rc1 has
33  * MAJ = 1
34  * MIN = 0
35  * REV = 7
36  * EXT = rc
37  * EXT_NUMBER = 1
38  *
39  * ABT_NUMVERSION will convert EXT to a format number:
40  * ALPHA (a) = 0
41  * BETA (b) = 1
42  * RC (rc) = 2
43  * PATCH (p) = 3
44  * Regular releases are treated as patch 0
45  *
46  * Numeric version will have 1 digit for MAJ, 2 digits for MIN, 2
47  * digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER. So,
48  * 1.0.7rc1 will have the numeric version 10007201.
49  */
50 #define ABT_VERSION "1.1a1"
51 #define ABT_NUMVERSION 10100001
52 
53 #define ABT_RELEASE_TYPE_ALPHA 0
54 #define ABT_RELEASE_TYPE_BETA 1
55 #define ABT_RELEASE_TYPE_RC 2
56 #define ABT_RELEASE_TYPE_PATCH 3
57 
58 #define ABT_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \
59  (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH))
60 
61 #define ABT_DEPRECATED __attribute__((deprecated))
62 
63 /* Error Classes */
64 #define ABT_SUCCESS 0 /* Successful return code */
65 #define ABT_ERR_UNINITIALIZED 1 /* Uninitialized */
66 #define ABT_ERR_MEM 2 /* Memory allocation failure */
67 #define ABT_ERR_OTHER 3 /* Other error */
68 #define ABT_ERR_INV_XSTREAM 4 /* Invalid ES */
69 #define ABT_ERR_INV_XSTREAM_RANK 5 /* Invalid ES rank */
70 #define ABT_ERR_INV_XSTREAM_BARRIER 6 /* Invalid ES barrier */
71 #define ABT_ERR_INV_SCHED 7 /* Invalid scheduler */
72 #define ABT_ERR_INV_SCHED_KIND 8 /* Invalid scheduler kind */
73 #define ABT_ERR_INV_SCHED_PREDEF 9 /* Invalid predefined scheduler */
74 #define ABT_ERR_INV_SCHED_TYPE 10 /* Invalid scheduler type */
75 #define ABT_ERR_INV_SCHED_CONFIG 11 /* Invalid scheduler config */
76 #define ABT_ERR_INV_POOL 12 /* Invalid pool */
77 #define ABT_ERR_INV_POOL_KIND 13 /* Invalid pool kind */
78 #define ABT_ERR_INV_POOL_ACCESS 14 /* Invalid pool access mode */
79 #define ABT_ERR_INV_UNIT 15 /* Invalid scheduling unit */
80 #define ABT_ERR_INV_THREAD 16 /* Invalid ULT */
81 #define ABT_ERR_INV_THREAD_ATTR 17 /* Invalid ULT attribute */
82 #define ABT_ERR_INV_TASK ABT_ERR_INV_THREAD
83 #define ABT_ERR_INV_KEY 19 /* Invalid key */
84 #define ABT_ERR_INV_MUTEX 20 /* Invalid mutex */
85 #define ABT_ERR_INV_MUTEX_ATTR 21 /* Invalid mutex attribute */
86 #define ABT_ERR_INV_COND 22 /* Invalid condition variable */
87 #define ABT_ERR_INV_RWLOCK 23 /* Invalid rw lock */
88 #define ABT_ERR_INV_EVENTUAL 24 /* Invalid eventual */
89 #define ABT_ERR_INV_FUTURE 25 /* Invalid future */
90 #define ABT_ERR_INV_BARRIER 26 /* Invalid barrier */
91 #define ABT_ERR_INV_TIMER 27 /* Invalid timer */
92 #define ABT_ERR_INV_QUERY_KIND 28 /* Invalid query kind */
93 #define ABT_ERR_INV_TOOL_CONTEXT 52 /* Invalid tool context */
94 #define ABT_ERR_XSTREAM 29 /* ES-related error */
95 #define ABT_ERR_XSTREAM_STATE 30 /* ES state error */
96 #define ABT_ERR_XSTREAM_BARRIER 31 /* ES barrier-related error */
97 #define ABT_ERR_SCHED 32 /* Scheduler-related error */
98 #define ABT_ERR_SCHED_CONFIG 33 /* Scheduler config error */
99 #define ABT_ERR_POOL 34 /* Pool-related error */
100 #define ABT_ERR_UNIT 35 /* Scheduling unit-related error */
101 #define ABT_ERR_THREAD 36 /* ULT-related error */
102 #define ABT_ERR_TASK ABT_ERR_THREAD
103 #define ABT_ERR_KEY 38 /* Key-related error */
104 #define ABT_ERR_MUTEX 39 /* Mutex-related error */
105 #define ABT_ERR_MUTEX_LOCKED 40 /* Return value when mutex is locked */
106 #define ABT_ERR_COND 41 /* Condition-related error */
107 #define ABT_ERR_COND_TIMEDOUT 42 /* Return value when cond is timed out */
108 #define ABT_ERR_RWLOCK 43 /* rwlock-related error */
109 #define ABT_ERR_EVENTUAL 44 /* Eventual-related error */
110 #define ABT_ERR_FUTURE 45 /* Future-related error */
111 #define ABT_ERR_BARRIER 46 /* Barrier-related error */
112 #define ABT_ERR_TIMER 47 /* Timer-related error */
113 #define ABT_ERR_MIGRATION_TARGET 48 /* Migration target error */
114 #define ABT_ERR_MIGRATION_NA 49 /* Migration not available */
115 #define ABT_ERR_MISSING_JOIN 50 /* An ES or more did not join */
116 #define ABT_ERR_FEATURE_NA 51 /* Feature not available */
117 
118 
119 /* Constants */
123 };
124 
130 };
131 
132 #define ABT_TASK_STATE_READY ABT_THREAD_STATE_READY
133 #define ABT_TASK_STATE_RUNNING ABT_THREAD_STATE_RUNNING
134 #define ABT_TASK_STATE_TERMINATED ABT_THREAD_STATE_TERMINATED
135 
141 };
142 
144  ABT_SCHED_DEFAULT, /* Default scheduler */
145  ABT_SCHED_BASIC, /* Basic scheduler */
146  ABT_SCHED_PRIO, /* Priority scheduler */
147  ABT_SCHED_RANDWS, /* Random work-stealing scheduler */
148  ABT_SCHED_BASIC_WAIT /* Basic scheduler with ability to wait for units */
149 };
150 
152  ABT_SCHED_TYPE_ULT, /* can yield */
153  ABT_SCHED_TYPE_TASK /* cannot yield */
154 };
155 
157  ABT_POOL_FIFO, /* FIFO pool */
158  ABT_POOL_FIFO_WAIT /* FIFO pool with ability to wait for units */
159 };
160 
162  ABT_POOL_ACCESS_PRIV, /* Used by only one ES */
163  ABT_POOL_ACCESS_SPSC, /* Producers on ES1, consumers on ES2 */
164  ABT_POOL_ACCESS_MPSC, /* Producers on any ES, consumers on the same ES */
165  ABT_POOL_ACCESS_SPMC, /* Producers on the same ES, consumers on any ES */
166  ABT_POOL_ACCESS_MPMC /* Producers on any ES, consumers on any ES */
167 };
168 
172  ABT_UNIT_TYPE_XSTREAM, /* Deprecated. No Argobots function uses it. */
173  ABT_UNIT_TYPE_EXT /* Deprecated. This is used by ABT_self_get_type().
174  * The user should instead check the return value
175  * (i.e., if it returns ABT_SUCCESS or not), to
176  * check if the underlying work unit is an external
177  * thread. */
178 };
179 
181  /* Whether the debug mode is enabled or not */
183  /* Whether Argobots prints an error number when an error happens or not */
185  /* Whether Argobots prints a debug message or not */
187  /* Whether Argobots is configured to be Valgrind friendly */
189  /* Whether an error is checked or not */
191  /* Whether a pool access violation regarding producer is checked or not */
193  /* Whether a pool access violation regarding consumer is checked or not */
195  /* Whether floating-point registers are saved on context switching or not */
197  /* Whether the thread cancellation feature is supported or not */
199  /* Whether the task cancellation feature is supported or not */
201  /* Whether the thread and task migration feature is supported or not */
203  /* Whether the stackable scheduler feature is supported or not */
205  /* Whether the external thread feature is supported or not */
207  /* Whether a predefined scheduler sleeps or not */
209  /* Whether the Argobots configuration is printed on ABT_init() or not */
211  /* Whether the affinity setting is supported or not */
213  /* The maximum number of execution streams */
215  /* Default stack size of ULTs */
217  /* Default stack size of ULT-type schedulers */
219  /* Default event-checking frequency of a predefined scheduler */
221  /* Default sleep time of a predefined scheduler */
223  /* Whether the tool interface is enabled or not */
225 };
226 
234 };
235 
236 /* Execution entity */
238  ABT_EXEC_ENTITY_TYPE_EXT, /* External thread */
241 };
242 
243 /* Synchronization event */
257 };
258 
259 /* Tool event masks */
260 #define ABT_TOOL_EVENT_THREAD_NONE (0)
261 #define ABT_TOOL_EVENT_THREAD_CREATE (1 << 0)
262 #define ABT_TOOL_EVENT_THREAD_JOIN (1 << 1)
263 #define ABT_TOOL_EVENT_THREAD_FREE (1 << 2)
264 #define ABT_TOOL_EVENT_THREAD_REVIVE (1 << 3)
265 #define ABT_TOOL_EVENT_THREAD_RUN (1 << 4)
266 #define ABT_TOOL_EVENT_THREAD_FINISH (1 << 5)
267 #define ABT_TOOL_EVENT_THREAD_CANCEL (1 << 6)
268 #define ABT_TOOL_EVENT_THREAD_YIELD (1 << 7)
269 #define ABT_TOOL_EVENT_THREAD_SUSPEND (1 << 8)
270 #define ABT_TOOL_EVENT_THREAD_RESUME (1 << 9)
271 #define ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1))
272 
273 #define ABT_TOOL_EVENT_TASK_NONE (0)
274 #define ABT_TOOL_EVENT_TASK_CREATE (ABT_TOOL_EVENT_THREAD_CREATE << 12)
275 #define ABT_TOOL_EVENT_TASK_JOIN (ABT_TOOL_EVENT_THREAD_JOIN << 12)
276 #define ABT_TOOL_EVENT_TASK_FREE (ABT_TOOL_EVENT_THREAD_FREE << 12)
277 #define ABT_TOOL_EVENT_TASK_REVIVE (ABT_TOOL_EVENT_THREAD_REVIVE << 12)
278 #define ABT_TOOL_EVENT_TASK_RUN (ABT_TOOL_EVENT_THREAD_RUN << 12)
279 #define ABT_TOOL_EVENT_TASK_FINISH (ABT_TOOL_EVENT_THREAD_FINISH << 12)
280 #define ABT_TOOL_EVENT_TASK_CANCEL (ABT_TOOL_EVENT_THREAD_CANCEL << 12)
281 #define ABT_TOOL_EVENT_TASK_ALL ((uint64_t)(((1 << 12) - 1) << 12))
282 
283 /* Constants for ABT_bool */
284 #define ABT_TRUE 1
285 #define ABT_FALSE 0
286 
287 /* Rank representing any ES */
288 #define ABT_XSTREAM_ANY_RANK -1
289 
290 /* Data Types */
291 struct ABT_xstream_opaque;
292 struct ABT_xstream_barrier_opaque;
293 struct ABT_sched_opaque;
294 struct ABT_sched_config_opaque;
295 struct ABT_pool_opaque;
296 struct ABT_pool_config_opaque;
297 struct ABT_unit_opaque;
298 struct ABT_thread_opaque;
299 struct ABT_thread_attr_opaque;
300 struct ABT_task_opaque;
301 struct ABT_key_opaque;
302 struct ABT_mutex_opaque;
303 struct ABT_mutex_attr_opaque;
304 struct ABT_cond_opaque;
305 struct ABT_rwlock_opaque;
306 struct ABT_eventual_opaque;
307 struct ABT_future_opaque;
308 struct ABT_barrier_opaque;
309 struct ABT_timer_opaque;
310 struct ABT_tool_context_opaque;
311 
312 /* Execution Stream */
313 typedef struct ABT_xstream_opaque * ABT_xstream;
314 /* ES state */
316 /* ES barrier */
317 typedef struct ABT_xstream_barrier_opaque * ABT_xstream_barrier;
318 /* Scheduler */
319 typedef struct ABT_sched_opaque * ABT_sched;
320 /* Sched-specific config */
321 typedef struct ABT_sched_config_opaque * ABT_sched_config;
322 /* Predefined scheduler */
324 /* Scheduler state */
326 /* Scheduler type */
328 /* Pool */
329 typedef struct ABT_pool_opaque * ABT_pool;
330 /* Specific pool config */
331 typedef struct ABT_pool_config_opaque * ABT_pool_config;
332 /* Pool kind */
334 /* Pool access mode */
336 /* Unit */
337 typedef struct ABT_unit_opaque * ABT_unit;
338 /* Unit type */
340 /* Unit id */
341 typedef uint64_t ABT_unit_id;
342 /* User-Level Thread (ULT) */
343 typedef struct ABT_thread_opaque * ABT_thread;
344 /* ULT attribute */
345 typedef struct ABT_thread_attr_opaque * ABT_thread_attr;
346 /* ULT state */
348 /* Tasklet state */
349 typedef enum ABT_thread_state ABT_task_state;
350 /* ULT id (alias to keep backward compatibility) */
351 typedef ABT_unit_id ABT_thread_id;
352 /* Tasklet */
353 typedef struct ABT_thread_opaque * ABT_task;
354 /* WU-specific data key */
355 typedef struct ABT_key_opaque * ABT_key;
356 /* Mutex */
357 typedef struct ABT_mutex_opaque * ABT_mutex;
358 /* Mutex attribute */
359 typedef struct ABT_mutex_attr_opaque * ABT_mutex_attr;
360 /* Condition variable */
361 typedef struct ABT_cond_opaque * ABT_cond;
362 /* Readers writer lock */
363 typedef struct ABT_rwlock_opaque * ABT_rwlock;
364 /* Eventual */
365 typedef struct ABT_eventual_opaque * ABT_eventual;
366 /* Future */
367 typedef struct ABT_future_opaque * ABT_future;
368 /* Barrier */
369 typedef struct ABT_barrier_opaque * ABT_barrier;
370 /* Timer */
371 typedef struct ABT_timer_opaque * ABT_timer;
372 /* Boolean type */
373 typedef int ABT_bool;
374 /* Query kind */
376 /* Tool context */
377 typedef struct ABT_tool_context_opaque * ABT_tool_context;
378 /* Tool query kind */
380 /* Type of execution entity */
382 /* Type of synchronization event */
384 
385 
386 /* Null Object Handles */
387 #define ABT_NULL 0
388 #if ABT_NULL == 1
389 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL)
390 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL)
391 #define ABT_SCHED_NULL ((ABT_sched) NULL)
392 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL)
393 #define ABT_POOL_NULL ((ABT_pool) NULL)
394 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL)
395 #define ABT_UNIT_NULL ((ABT_unit) NULL)
396 #define ABT_THREAD_NULL ((ABT_thread) NULL)
397 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL)
398 #define ABT_KEY_NULL ((ABT_key) NULL)
399 #define ABT_MUTEX_NULL ((ABT_mutex) NULL)
400 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL)
401 #define ABT_COND_NULL ((ABT_cond) NULL)
402 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL)
403 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL)
404 #define ABT_FUTURE_NULL ((ABT_future) NULL)
405 #define ABT_BARRIER_NULL ((ABT_barrier) NULL)
406 #define ABT_TIMER_NULL ((ABT_timer) NULL)
407 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) NULL)
408 #else
409 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01))
410 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02))
411 #define ABT_SCHED_NULL ((ABT_sched) (0x03))
412 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04))
413 #define ABT_POOL_NULL ((ABT_pool) (0x05))
414 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06))
415 #define ABT_UNIT_NULL ((ABT_unit) (0x07))
416 #define ABT_THREAD_NULL ((ABT_thread) (0x08))
417 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09))
418 #define ABT_KEY_NULL ((ABT_key) (0x0b))
419 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c))
420 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d))
421 #define ABT_COND_NULL ((ABT_cond) (0x0e))
422 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f))
423 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10))
424 #define ABT_FUTURE_NULL ((ABT_future) (0x11))
425 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12))
426 #define ABT_TIMER_NULL ((ABT_timer) (0x13))
427 #define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14))
428 #endif
429 #define ABT_TASK_NULL ABT_THREAD_NULL
430 
431 /* Scheduler config */
432 typedef enum {
433  ABT_SCHED_CONFIG_INT = 0, /* Parameter of type int */
434  ABT_SCHED_CONFIG_DOUBLE = 1, /* Parameter of type double */
435  ABT_SCHED_CONFIG_PTR = 2, /* Parameter of type pointer */
437 
438 typedef struct {
439  int idx;
442 
444  /* To mark the last parameter in ABT_sched_config_create */
446  /* To configure the frequency for checking events of the basic scheduler */
448  /* To configure the access type of the pools created automatically */
450  /* To configure whether the scheduler is freed automatically or not */
451 
452 /* Scheduler Functions */
454 typedef void (*ABT_sched_run_fn)(ABT_sched);
455 typedef int (*ABT_sched_free_fn)(ABT_sched);
456 /* To get a pool ready for receiving a migration */
458 
459 typedef struct {
460  ABT_sched_type type; /* ULT or tasklet */
461 
462  /* Functions of the scheduler */
467 } ABT_sched_def;
468 
469 /* Pool Functions */
476 typedef void (*ABT_unit_free_fn)(ABT_unit *);
478 typedef size_t (*ABT_pool_get_size_fn)(ABT_pool);
482 typedef ABT_unit (*ABT_pool_pop_timedwait_fn)(ABT_pool, double); /* Deprecated .*/
484 typedef int (*ABT_pool_free_fn)(ABT_pool);
485 typedef int (*ABT_pool_print_all_fn)(ABT_pool, void *arg,
486  void (*)(void*, ABT_unit));
487 
488 typedef struct {
489  ABT_pool_access access; /* Access type */
490 
491  /* Functions to manage units */
499 
500  /* Functions to manage the pool */
506  ABT_pool_pop_timedwait_fn p_pop_timedwait; /* Deprecated. No built-in
507  * scheduler uses pop_timedwait().
508  * Use p_pop_wait() instead. */
512 } ABT_pool_def;
513 
514 /* Tool callback type. */
515 typedef void (*ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event,
516  ABT_tool_context context, void *user_arg);
517 typedef void (*ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event,
518  ABT_tool_context context, void *user_arg);
519 
520 /* Init & Finalize */
521 int ABT_init(int argc, char **argv) ABT_API_PUBLIC;
522 int ABT_finalize(void) ABT_API_PUBLIC;
523 int ABT_initialized(void) ABT_API_PUBLIC;
524 
525 /* Execution Stream (ES) */
526 int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC;
527 int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools,
528  ABT_pool *pools, ABT_sched_config config,
529  ABT_xstream *newxstream) ABT_API_PUBLIC;
530 int ABT_xstream_create_with_rank(ABT_sched sched, int rank,
531  ABT_xstream *newxstream) ABT_API_PUBLIC;
532 int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC;
533 int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC;
534 int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC;
535 int ABT_xstream_exit(void) ABT_API_PUBLIC;
536 int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC;
537 int ABT_xstream_self(ABT_xstream *xstream) ABT_API_PUBLIC;
538 int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC;
539 int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC;
540 int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC;
541 int ABT_xstream_set_main_sched(ABT_xstream xstream, ABT_sched sched) ABT_API_PUBLIC;
542 int ABT_xstream_set_main_sched_basic(ABT_xstream xstream,
543  ABT_sched_predef predef,
544  int num_pools, ABT_pool *pools) ABT_API_PUBLIC;
545 int ABT_xstream_get_main_sched(ABT_xstream xstream, ABT_sched *sched) ABT_API_PUBLIC;
546 int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools,
547  ABT_pool *pools) ABT_API_PUBLIC;
548 int ABT_xstream_get_state(ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC;
549 int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2,
550  ABT_bool *result) ABT_API_PUBLIC;
551 int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC;
552 int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *flag) ABT_API_PUBLIC;
553 int ABT_xstream_run_unit(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC;
554 int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC;
555 int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC;
556 int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC;
557 int ABT_xstream_set_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset)
558  ABT_API_PUBLIC;
559 int ABT_xstream_get_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset,
560  int *num_cpus) ABT_API_PUBLIC;
561 
562 /* ES Barrier */
563 int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier)
564  ABT_API_PUBLIC;
565 int ABT_xstream_barrier_free(ABT_xstream_barrier *barrier) ABT_API_PUBLIC;
566 int ABT_xstream_barrier_wait(ABT_xstream_barrier barrier) ABT_API_PUBLIC;
567 
568 /* Scheduler */
569 int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools,
570  ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC;
571 int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools,
572  ABT_pool *pools, ABT_sched_config config,
573  ABT_sched *newsched) ABT_API_PUBLIC;
574 int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC;
575 int ABT_sched_set_data(ABT_sched sched, void *data) ABT_API_PUBLIC;
576 int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC;
577 int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC;
578 int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx,
579  ABT_pool *pools) ABT_API_PUBLIC;
580 int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
581 int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
582 int ABT_sched_finish(ABT_sched sched) ABT_API_PUBLIC;
583 int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC;
584 int ABT_sched_has_to_stop(ABT_sched sched, ABT_bool *stop) ABT_API_PUBLIC;
585 
586 /* Scheduler config */
587 int ABT_sched_config_create(ABT_sched_config *config, ...) ABT_API_PUBLIC;
588 int ABT_sched_config_read(ABT_sched_config config, int num_vars, ...) ABT_API_PUBLIC;
589 int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC;
590 
591 /* Pool */
592 int ABT_pool_create(ABT_pool_def *def, ABT_pool_config config,
593  ABT_pool *newpool) ABT_API_PUBLIC;
594 int ABT_pool_create_basic(ABT_pool_kind kind, ABT_pool_access access,
595  ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC;
596 int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC;
597 int ABT_pool_get_access(ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC;
598 int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
599 int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
600 int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC;
601 int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC;
602 int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs)
603  ABT_DEPRECATED ABT_API_PUBLIC;
604 int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC;
605 int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC;
606 int ABT_pool_print_all(ABT_pool pool, void *arg,
607  void (*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC;
608 int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC;
609 int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC;
610 int ABT_pool_add_sched(ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC;
611 int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC;
612 
613 /* Work Unit */
614 int ABT_unit_set_associated_pool(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC;
615 
616 /* User-level Thread (ULT) */
617 int ABT_thread_create(ABT_pool pool, void (*thread_func)(void *), void *arg,
618  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
619 int ABT_thread_create_on_xstream(ABT_xstream xstream,
620  void (*thread_func)(void *), void *arg,
621  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
622 int ABT_thread_create_many(int num, ABT_pool *pool_list,
623  void (**thread_func_list)(void *), void **arg_list,
624  ABT_thread_attr attr, ABT_thread *newthread_list)
625  ABT_API_PUBLIC;
626 int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg,
627  ABT_thread *thread) ABT_API_PUBLIC;
628 int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC;
629 int ABT_thread_free_many(int num, ABT_thread *thread_list) ABT_API_PUBLIC;
630 int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC;
631 int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
632 int ABT_thread_exit(void) ABT_API_PUBLIC;
633 int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC;
634 int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC;
635 int ABT_thread_self_id(ABT_unit_id *id) ABT_API_PUBLIC;
636 int ABT_thread_get_last_xstream(ABT_thread thread, ABT_xstream *xstream) ABT_API_PUBLIC;
637 int ABT_thread_get_state(ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC;
638 int ABT_thread_get_last_pool(ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC;
639 int ABT_thread_get_last_pool_id(ABT_thread thread, int *id) ABT_API_PUBLIC;
640 int ABT_thread_set_associated_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC;
641 int ABT_thread_yield_to(ABT_thread thread) ABT_API_PUBLIC;
642 int ABT_thread_yield(void) ABT_API_PUBLIC;
643 int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC;
644 int ABT_thread_migrate_to_xstream(ABT_thread thread, ABT_xstream xstream) ABT_API_PUBLIC;
645 int ABT_thread_migrate_to_sched(ABT_thread thread, ABT_sched sched) ABT_API_PUBLIC;
646 int ABT_thread_migrate_to_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC;
647 int ABT_thread_migrate(ABT_thread thread) ABT_API_PUBLIC;
648 int ABT_thread_set_callback(ABT_thread thread,
649  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
650 int ABT_thread_set_migratable(ABT_thread thread, ABT_bool flag) ABT_API_PUBLIC;
651 int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC;
652 int ABT_thread_is_primary(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC;
653 int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC;
654 int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result)
655  ABT_API_PUBLIC;
656 int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC;
657 int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC;
658 int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC;
659 int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC;
660 int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC;
661 int ABT_thread_get_specific(ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC;
662 int ABT_thread_get_attr(ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC;
663 
664 /* ULT Attributes */
665 int ABT_thread_attr_create(ABT_thread_attr *newattr) ABT_API_PUBLIC;
666 int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC;
667 int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr,
668  size_t stacksize) ABT_API_PUBLIC;
669 int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr,
670  size_t *stacksize) ABT_API_PUBLIC;
671 int ABT_thread_attr_set_stacksize(ABT_thread_attr attr, size_t stacksize) ABT_API_PUBLIC;
672 int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC;
673 int ABT_thread_attr_set_callback(ABT_thread_attr attr,
674  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
675 int ABT_thread_attr_set_migratable(ABT_thread_attr attr, ABT_bool flag) ABT_API_PUBLIC;
676 
677 /* Tasklet */
678 int ABT_task_create(ABT_pool pool, void (*task_func)(void *), void *arg,
679  ABT_task *newtask) ABT_API_PUBLIC;
680 int ABT_task_create_on_xstream(ABT_xstream xstream, void (*task_func)(void *),
681  void *arg, ABT_task *newtask) ABT_API_PUBLIC;
682 #define ABT_task_revive ABT_thread_revive
683 #define ABT_task_free ABT_thread_free
684 #define ABT_task_join ABT_thread_join
685 #define ABT_task_cancel ABT_thread_cancel
686 int ABT_task_self(ABT_task *task) ABT_API_PUBLIC;
687 int ABT_task_self_id(ABT_unit_id *id) ABT_API_PUBLIC;
688 #define ABT_task_get_xstream ABT_thread_get_last_xstream
689 #define ABT_task_get_state ABT_thread_get_state
690 #define ABT_task_get_last_pool ABT_thread_get_last_pool
691 #define ABT_task_get_last_pool_id ABT_thread_get_last_pool_id
692 #define ABT_task_set_migratable ABT_thread_set_migratable
693 #define ABT_task_is_migratable ABT_thread_is_migratable
694 #define ABT_task_is_unnamed ABT_thread_is_unnamed
695 #define ABT_task_equal ABT_thread_equal
696 #define ABT_task_get_id ABT_thread_get_id
697 #define ABT_task_get_arg ABT_thread_get_arg
698 #define ABT_task_set_specific ABT_thread_set_specific
699 #define ABT_task_get_specific ABT_thread_get_specific
700 
701 /* Self */
702 int ABT_self_get_type(ABT_unit_type *type) ABT_API_PUBLIC;
703 int ABT_self_is_primary(ABT_bool *flag) ABT_API_PUBLIC;
704 int ABT_self_on_primary_xstream(ABT_bool *flag) ABT_API_PUBLIC;
705 int ABT_self_is_unnamed(ABT_bool *flag) ABT_API_PUBLIC;
706 int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC;
707 int ABT_self_suspend(void) ABT_API_PUBLIC;
708 int ABT_self_set_arg(void *arg) ABT_API_PUBLIC;
709 int ABT_self_get_arg(void **arg) ABT_API_PUBLIC;
710 
711 /* ULT-specific data */
712 int ABT_key_create(void (*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC;
713 int ABT_key_free(ABT_key *key) ABT_API_PUBLIC;
714 int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC;
715 int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC;
716 
717 /* Mutex */
718 int ABT_mutex_create(ABT_mutex *newmutex) ABT_API_PUBLIC;
719 int ABT_mutex_create_with_attr(ABT_mutex_attr attr, ABT_mutex *newmutex) ABT_API_PUBLIC;
720 int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC;
721 int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC;
722 int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC;
723 int ABT_mutex_lock_low(ABT_mutex mutex) ABT_API_PUBLIC;
724 int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC;
725 int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC;
726 int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC;
727 int ABT_mutex_unlock_se(ABT_mutex mutex) ABT_API_PUBLIC;
728 int ABT_mutex_unlock_de(ABT_mutex mutex) ABT_API_PUBLIC;
729 int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC;
730 
731 /* Mutex Attributes */
732 int ABT_mutex_attr_create(ABT_mutex_attr *newattr) ABT_API_PUBLIC;
733 int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC;
734 int ABT_mutex_attr_set_recursive(ABT_mutex_attr attr, ABT_bool recursive) ABT_API_PUBLIC;
735 
736 /* Condition variable */
737 int ABT_cond_create(ABT_cond *newcond) ABT_API_PUBLIC;
738 int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC;
739 int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC;
740 int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex,
741  const struct timespec *abstime) ABT_API_PUBLIC;
742 int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC;
743 int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC;
744 
745 /* Readers writer lock */
746 int ABT_rwlock_create(ABT_rwlock *newrwlock) ABT_API_PUBLIC;
747 int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC;
748 int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC;
749 int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC;
750 int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC;
751 
752 /* Eventual */
753 int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC;
754 int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC;
755 int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC;
756 int ABT_eventual_test(ABT_eventual eventual, void **value, int *is_ready) ABT_API_PUBLIC;
757 int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC;
758 int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC;
759 
760 /* Futures */
761 int ABT_future_create(uint32_t compartments, void (*cb_func)(void **arg),
762  ABT_future *newfuture) ABT_API_PUBLIC;
763 int ABT_future_free(ABT_future *future) ABT_API_PUBLIC;
764 int ABT_future_wait(ABT_future future) ABT_API_PUBLIC;
765 int ABT_future_test(ABT_future future, ABT_bool *flag) ABT_API_PUBLIC;
766 int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC;
767 int ABT_future_reset(ABT_future future) ABT_API_PUBLIC;
768 
769 /* Barrier */
770 int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC;
771 int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC;
772 int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC;
773 int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC;
774 int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters)
775  ABT_API_PUBLIC;
776 
777 /* Error */
778 int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC;
779 
780 /* Timer */
781 double ABT_get_wtime(void) ABT_API_PUBLIC;
782 int ABT_timer_create(ABT_timer *newtimer) ABT_API_PUBLIC;
783 int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC;
784 int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC;
785 int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC;
786 int ABT_timer_stop(ABT_timer timer) ABT_API_PUBLIC;
787 int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
788 int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
789 int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC;
790 int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC;
791 
792 /* Information */
793 int ABT_info_query_config(ABT_info_query_kind query_kind,
794  void *val) ABT_API_PUBLIC;
795 int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC;
796 int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC;
797 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC;
798 int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC;
799 int ABT_info_print_pool(FILE* fp, ABT_pool pool) ABT_API_PUBLIC;
800 int ABT_info_print_thread(FILE* fp, ABT_thread thread) ABT_API_PUBLIC;
801 int ABT_info_print_thread_attr(FILE* fp, ABT_thread_attr attr) ABT_API_PUBLIC;
802 int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) ABT_API_PUBLIC;
803 int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC;
804 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
805  void (*cb_func)(ABT_bool, void *),
806  void *arg) ABT_API_PUBLIC;
807 #define ABT_info_print_task ABT_info_print_thread
808 
809 /* Tool Functions */
811  uint64_t event_mask_thread,
812  void *user_arg) ABT_API_PUBLIC;
814  uint64_t event_mask_task,
815  void *user_arg) ABT_API_PUBLIC;
816 int ABT_tool_query_thread(ABT_tool_context context, uint64_t event_thread,
817  ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC;
818 int ABT_tool_query_task(ABT_tool_context context, uint64_t event_task,
819  ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC;
820 
821 #if defined(__cplusplus)
822 }
823 #endif
824 
825 #endif /* ABT_H_INCLUDED */
int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC
Signal the future.
Definition: futures.c:228
int ABT_timer_stop(ABT_timer timer) ABT_API_PUBLIC
Stop the timer.
Definition: timer.c:142
int ABT_thread_set_specific(ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC
Set the ULT-specific value associated with the key.
Definition: thread.c:1225
int ABT_mutex_unlock_se(ABT_mutex mutex) ABT_API_PUBLIC
Hand over the mutex within the ES.
Definition: mutex.c:364
int ABT_future_test(ABT_future future, ABT_bool *flag) ABT_API_PUBLIC
Test whether the future is ready.
Definition: futures.c:201
ABT_sched_free_fn free
Definition: abt.h:465
int ABT_init(int argc, char **argv) ABT_API_PUBLIC
Initialize the Argobots execution environment.
Definition: global.c:44
struct ABT_thread_attr_opaque * ABT_thread_attr
Definition: abt.h:345
int ABT_thread_exit(void) ABT_API_PUBLIC
The calling ULT terminates its execution.
Definition: thread.c:409
int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC
Get the sum of the sizes of the pool of sched.
Definition: sched.c:298
int ABT_thread_get_last_pool_id(ABT_thread thread, int *id) ABT_API_PUBLIC
Get the last pool&#39;s ID of the ULT.
Definition: thread.c:577
struct ABT_unit_opaque * ABT_unit
Definition: abt.h:337
int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC
Pop a unit from the target pool.
Definition: pool.c:158
int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier) ABT_API_PUBLIC
Create a new ES barrier.
ABT_sched_state
Definition: abt.h:136
struct ABT_mutex_attr_opaque * ABT_mutex_attr
Definition: abt.h:359
int ABT_xstream_self(ABT_xstream *xstream) ABT_API_PUBLIC
Return the ES handle associated with the caller work unit.
Definition: stream.c:341
struct ABT_barrier_opaque * ABT_barrier
Definition: abt.h:369
ABT_unit_get_task_fn u_get_task
Definition: abt.h:494
int ABT_thread_get_state(ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC
Return the state of thread.
Definition: thread.c:533
uint64_t ABT_unit_id
Definition: abt.h:341
int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC
Write the information of the target scheduler to the output stream.
Definition: info.c:321
ABT_pool_init_fn p_init
Definition: abt.h:501
ABT_sched_predef
Definition: abt.h:143
int ABT_cond_create(ABT_cond *newcond) ABT_API_PUBLIC
Create a new condition variable.
Definition: cond.c:29
ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)
Definition: abt.h:481
struct ABT_xstream_opaque * ABT_xstream
Definition: abt.h:313
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:484
struct ABT_sched_opaque * ABT_sched
Definition: abt.h:319
int ABT_sched_finish(ABT_sched sched) ABT_API_PUBLIC
Ask a scheduler to finish.
Definition: sched.c:188
int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC
Reset the readiness of the target eventual.
Definition: eventual.c:283
int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Dump stack information of all the threads in the target pool.
Definition: info.c:446
int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC
Wait for a number of ULTs to terminate.
Definition: thread.c:386
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Write the configuration information to the output stream.
Definition: info.c:246
int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC
Free the barrier.
Definition: barrier.c:115
int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Return the size of a pool.
Definition: pool.c:140
int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC
Stop the timer and add the elapsed time of the timer.
Definition: timer.c:220
int ABT_thread_attr_set_stacksize(ABT_thread_attr attr, size_t stacksize) ABT_API_PUBLIC
Set the stack size in the attribute object.
Definition: thread_attr.c:151
int ABT_self_set_arg(void *arg) ABT_API_PUBLIC
Set the argument for the work unit function.
Definition: self.c:175
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
Definition: abt.h:470
int ABT_info_print_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC
Write the information of the target pool to the output stream.
Definition: info.c:342
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
Definition: abt.h:482
int ABT_rwlock_create(ABT_rwlock *newrwlock) ABT_API_PUBLIC
Create a new rwlock ABT_rwlock_create creates a new rwlock object and returns its handle through newr...
Definition: rwlock.c:24
int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC
Request the cancellation of the target thread.
Definition: thread.c:427
ABT_sched_config_var ABT_sched_config_automatic
Definition: config.c:26
int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr, size_t stacksize) ABT_API_PUBLIC
Set stack attributes.
Definition: thread_attr.c:84
int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC
Free the condition variable.
Definition: cond.c:53
int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC
Definition: mutex.c:209
int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC
Return the number of current existing ESs.
Definition: stream.c:632
int ABT_xstream_set_rank(ABT_xstream xstream, int rank) ABT_API_PUBLIC
Set the rank for target ES.
Definition: stream.c:382
int ABT_thread_attr_set_migratable(ABT_thread_attr attr, ABT_bool flag) ABT_API_PUBLIC
Set the ULT&#39;s migratability in the attribute object.
Definition: thread_attr.c:238
struct ABT_thread_opaque * ABT_task
Definition: abt.h:353
int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC
Release the thread object associated with thread handle.
Definition: thread.c:284
ABT_xstream_state
Definition: abt.h:120
int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC
Free the mutex object.
Definition: mutex.c:108
int ABT_thread_get_attr(ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC
Get attributes of the target ULT.
Definition: thread.c:1285
int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new ES and return its handle through newxstream.
Definition: stream.c:46
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:476
int ABT_pool_pop_wait(ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC
Pop a unit from the target pool with wait.
Definition: pool.c:187
int ABT_mutex_lock_low(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex with low priority.
Definition: mutex.c:181
int ABT_mutex_create_with_attr(ABT_mutex_attr attr, ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex with attributes.
Definition: mutex.c:72
int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC
Get the stack size from the attribute object.
Definition: thread_attr.c:182
int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC
Create a new barrier.
Definition: barrier.c:26
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume the target ULT.
Definition: thread.c:750
ABT_sched_config_var ABT_sched_config_access
Definition: config.c:23
ABT_sched_init_fn init
Definition: abt.h:463
int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC
Return the rank of ES associated with the caller work unit.
Definition: stream.c:363
int ABT_thread_attr_set_callback(ABT_thread_attr attr, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC
Set callback function and its argument in the attribute object.
Definition: thread_attr.c:204
int ABT_task_create(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC
Create a new task and return its handle through newtask.
Definition: task.c:40
int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC
Duplicate the timer.
Definition: timer.c:67
int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC
Return the rank of ES.
Definition: stream.c:405
int ABT_tool_register_thread_callback(ABT_tool_thread_callback_fn cb_func, uint64_t event_mask_thread, void *user_arg) ABT_API_PUBLIC
Register a callback function for ULT events.
Definition: tool.c:44
int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC
Write the information of the target ES to the output stream.
Definition: info.c:300
int ABT_bool
Definition: abt.h:373
int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC
Create a new user-defined scheduler and return its handle through newsched.
Definition: sched.c:41
ABT_unit_get_thread_fn u_get_thread
Definition: abt.h:493
int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC
Get the value associated with the key.
Definition: key.c:125
ABT_pool_pop_fn p_pop
Definition: abt.h:504
int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Unlock the rwlock.
Definition: rwlock.c:158
int ABT_thread_migrate(ABT_thread thread) ABT_API_PUBLIC
Request migration of the thread to an any available ES.
Definition: thread.c:923
void(* ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
Definition: abt.h:515
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Request the cancellation of the target ES.
Definition: stream.c:309
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
Definition: abt.h:473
int ABT_xstream_get_main_sched(ABT_xstream xstream, ABT_sched *sched) ABT_API_PUBLIC
Get the main scheduler of the target ES.
Definition: stream.c:544
int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex, const struct timespec *abstime) ABT_API_PUBLIC
Wait on the condition.
Definition: cond.c:119
int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *flag) ABT_API_PUBLIC
Check if the target ES is the primary ES.
Definition: stream.c:656
ABT_pool_access access
Definition: abt.h:489
int ABT_thread_migrate_to_xstream(ABT_thread thread, ABT_xstream xstream) ABT_API_PUBLIC
Migrate a thread to a specific ES.
Definition: thread.c:791
int ABT_self_get_type(ABT_unit_type *type) ABT_API_PUBLIC
Return the type of calling work unit.
Definition: self.c:34
int ABT_task_self(ABT_task *task) ABT_API_PUBLIC
Return the handle of the calling tasklet.
Definition: task.c:197
int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC
Wait on the condition.
Definition: cond.c:84
struct ABT_pool_opaque * ABT_pool
Definition: abt.h:329
ABT_unit_is_in_pool_fn u_is_in_pool
Definition: abt.h:495
ABT_pool_push_fn p_push
Definition: abt.h:503
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
Definition: abt.h:480
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:477
int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC
Ask a scheduler to stop as soon as possible.
Definition: sched.c:209
struct ABT_mutex_opaque * ABT_mutex
Definition: abt.h:357
int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Read the elapsed time of the timer.
Definition: timer.c:165
int ABT_key_free(ABT_key *key) ABT_API_PUBLIC
Free an WU-specific data key.
Definition: key.c:68
int ABT_thread_create(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC
Create a new thread and return its handle through newthread.
Definition: thread.c:63
int ABT_thread_set_callback(ABT_thread thread, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC
Set the callback function.
Definition: thread.c:973
int ABT_sched_config_read(ABT_sched_config config, int num_vars,...) ABT_API_PUBLIC
Copy the set values from config into the variables passed in the dynamic list of arguments.
Definition: config.c:163
struct ABT_rwlock_opaque * ABT_rwlock
Definition: abt.h:363
int ABT_xstream_create_with_rank(ABT_sched sched, int rank, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new ES with a specific rank.
Definition: stream.c:128
struct ABT_key_opaque * ABT_key
Definition: abt.h:355
int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC
Retrieve the specific data of the target user-defined pool.
Definition: pool.c:309
int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg) ABT_API_PUBLIC
Dump stacks of threads in pools existing in Argobots.
Definition: info.c:492
int ABT_task_create_on_xstream(ABT_xstream xstream, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC
Create a new tasklet associated with the target ES (xstream).
Definition: task.c:90
int ABT_mutex_unlock_de(ABT_mutex mutex) ABT_API_PUBLIC
Definition: mutex.c:393
#define ABT_DEPRECATED
Definition: abt.h:61
int ABT_xstream_barrier_wait(ABT_xstream_barrier barrier) ABT_API_PUBLIC
Wait on the barrier.
int ABT_mutex_create(ABT_mutex *newmutex) ABT_API_PUBLIC
Create a new mutex.
Definition: mutex.c:38
int ABT_info_print_thread_attr(FILE *fp, ABT_thread_attr attr) ABT_API_PUBLIC
Write the information of the target ULT attribute to the output stream.
Definition: info.c:385
int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC
Obtain the overhead time of using ABT_timer.
Definition: timer.c:246
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the processor from the current running ULT back to the scheduler.
Definition: thread.c:723
int ABT_thread_attr_create(ABT_thread_attr *newattr) ABT_API_PUBLIC
Create a new ULT attribute object.
Definition: thread_attr.c:26
int ABT_xstream_set_main_sched_basic(ABT_xstream xstream, ABT_sched_predef predef, int num_pools, ABT_pool *pools) ABT_API_PUBLIC
Set the main scheduler for xstream with a predefined scheduler.
Definition: stream.c:510
int ABT_thread_get_last_pool(ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC
Return the last pool of ULT.
Definition: thread.c:554
struct ABT_thread_opaque * ABT_thread
Definition: abt.h:343
ABT_sched_config_type type
Definition: abt.h:440
int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC
Get the number of pools associated with scheduler.
Definition: sched.c:144
int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC
Get the sum of the sizes of the pool of sched.
Definition: sched.c:331
int ABT_future_free(ABT_future *future) ABT_API_PUBLIC
Free the future object.
Definition: futures.c:93
int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC
Get the ID of the target pool.
Definition: pool.c:369
int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools, ABT_pool *pools) ABT_API_PUBLIC
Get the pools of the main scheduler of the target ES.
Definition: stream.c:566
int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC
Free the rwlock object.
Definition: rwlock.c:62
enum ABT_thread_state ABT_task_state
Definition: abt.h:349
int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC
Write the information of all created ESs to the output stream.
Definition: info.c:266
int ABT_thread_free_many(int num, ABT_thread *thread_list) ABT_API_PUBLIC
Release a set of ULT objects.
Definition: thread.c:329
int ABT_future_wait(ABT_future future) ABT_API_PUBLIC
Wait on the future.
Definition: futures.c:125
int ABT_future_create(uint32_t compartments, void(*cb_func)(void **arg), ABT_future *newfuture) ABT_API_PUBLIC
Create a future.
Definition: futures.c:56
int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock the rwlock as a writer.
Definition: rwlock.c:125
int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_xstream *newxstream) ABT_API_PUBLIC
Create a new ES with a predefined scheduler and return its handle through newxstream.
Definition: stream.c:91
int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC
Reinitialize the barrier.
Definition: barrier.c:69
ABT_sched_config_type
Definition: abt.h:432
int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC
Get the ULT&#39;s stack size.
Definition: thread.c:1139
int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC
Set the specific data of the target user-defined pool.
Definition: pool.c:288
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
Definition: abt.h:457
ABT_pool_free_fn p_free
Definition: abt.h:510
int ABT_timer_create(ABT_timer *newtimer) ABT_API_PUBLIC
Create a new timer.
Definition: timer.c:42
int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC
Get the string of error code and its length.
Definition: error.c:27
int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC
Get the ULT&#39;s migratability.
Definition: thread.c:1043
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for xstream to terminate.
Definition: stream.c:261
int ABT_info_query_config(ABT_info_query_kind query_kind, void *val) ABT_API_PUBLIC
Get the configuration information associated with query_kind.
Definition: info.c:116
int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC
Check the events and process them.
Definition: stream.c:709
int ABT_xstream_set_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset) ABT_API_PUBLIC
Set the CPU affinity of the target ES.
Definition: stream.c:797
int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC
Free the timer object.
Definition: timer.c:95
int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC
Free the given pool, and modify its value to ABT_POOL_NULL.
Definition: pool.c:75
int ABT_pool_print_all(ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC
int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC
Bind the target ES to a target CPU.
Definition: stream.c:734
int ABT_finalize(void) ABT_API_PUBLIC
Terminate the Argobots execution environment.
Definition: global.c:73
int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC
Get the CPU binding for the target ES.
Definition: stream.c:761
ABT_unit_free_fn u_free
Definition: abt.h:498
int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC
Release the scheduler object associated with sched handle.
Definition: sched.c:116
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Definition: abt.h:317
ABT_pool_access
Definition: abt.h:161
int ABT_xstream_get_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset, int *num_cpus) ABT_API_PUBLIC
Get the CPU affinity for the target ES.
Definition: stream.c:831
int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC
Free the eventual object.
Definition: eventual.c:71
int ABT_thread_is_primary(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC
Check if the target ULT is the primary ULT.
Definition: thread.c:1073
int ABT_xstream_exit(void) ABT_API_PUBLIC
Terminate the ES associated with the calling ULT.
Definition: stream.c:285
ABT_unit_type
Definition: abt.h:169
int ABT_thread_create_many(int num, ABT_pool *pool_list, void(**thread_func_list)(void *), void **arg_list, ABT_thread_attr attr, ABT_thread *newthread_list) ABT_API_PUBLIC
Create a set of ULTs.
Definition: thread.c:178
int ABT_thread_set_migratable(ABT_thread thread, ABT_bool flag) ABT_API_PUBLIC
Set the ULT&#39;s migratability.
Definition: thread.c:1009
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
Definition: abt.h:453
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
Definition: abt.h:475
int ABT_tool_query_thread(ABT_tool_context context, uint64_t event_thread, ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC
Query information associated with a ULT event.
Definition: tool.c:195
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the current ULT.
Definition: self.c:150
int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Remove a specified unit from the target pool.
Definition: pool.c:235
int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr, size_t *stacksize) ABT_API_PUBLIC
Get stack attributes.
Definition: thread_attr.c:128
int ABT_task_self_id(ABT_unit_id *id) ABT_API_PUBLIC
Return the ID of the calling tasklet.
Definition: task.c:226
int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs) ABT_DEPRECATED ABT_API_PUBLIC
Definition: pool.c:196
int ABT_mutex_attr_set_recursive(ABT_mutex_attr attr, ABT_bool recursive) ABT_API_PUBLIC
Set the recursive property in the attribute object.
Definition: mutex_attr.c:83
int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Push a unit to the target pool.
Definition: pool.c:214
int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC
Wait on the barrier.
Definition: barrier.c:149
size_t(* ABT_pool_get_size_fn)(ABT_pool)
Definition: abt.h:478
struct ABT_future_opaque * ABT_future
Definition: abt.h:367
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for thread to terminate.
Definition: thread.c:353
int ABT_thread_self_id(ABT_unit_id *id) ABT_API_PUBLIC
Return the calling ULT&#39;s ID.
Definition: thread.c:493
int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex.
Definition: mutex.c:140
int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC
Release the ES object associated with ES handle.
Definition: stream.c:217
int ABT_thread_migrate_to_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Migrate a thread to a specific pool.
Definition: thread.c:883
int ABT_tool_query_task(ABT_tool_context context, uint64_t event_task, ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC
Query information associated with a tasklet event.
Definition: tool.c:225
int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Dump the stack of the target thread to the output stream.
Definition: info.c:422
int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters) ABT_API_PUBLIC
Get the number of waiters for the barrier.
Definition: barrier.c:243
ABT_unit_id ABT_thread_id
Definition: abt.h:351
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:454
int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC
Free the ULT attribute object.
Definition: thread_attr.c:51
ABT_sched_type type
Definition: abt.h:460
struct ABT_eventual_opaque * ABT_eventual
Definition: abt.h:365
int ABT_pool_add_sched(ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC
Push a scheduler to a pool.
Definition: pool.c:336
struct ABT_tool_context_opaque * ABT_tool_context
Definition: abt.h:377
int ABT_info_print_thread(FILE *fp, ABT_thread thread) ABT_API_PUBLIC
Write the information of the target ULT to the output stream.
Definition: info.c:363
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free the configuration.
Definition: config.c:195
int ABT_key_create(void(*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC
Create an WU-specific data key.
Definition: key.c:42
int ABT_thread_set_associated_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC
Set the associated pool for the target ULT.
Definition: thread.c:604
ABT_tool_query_kind
Definition: abt.h:227
ABT_pool_kind
Definition: abt.h:156
ABT_unit_create_from_task_fn u_create_from_task
Definition: abt.h:497
int ABT_self_get_arg(void **arg) ABT_API_PUBLIC
Retrieve the argument for the work unit function.
Definition: self.c:200
int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Stop the timer and read the elapsed time of the timer.
Definition: timer.c:192
int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC
Compare two mutex handles for equality.
Definition: mutex.c:418
int ABT_pool_get_access(ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC
Get the access type of target pool.
Definition: pool.c:97
int ABT_pool_create_basic(ABT_pool_kind kind, ABT_pool_access access, ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool from a predefined type and return its handle through newpool.
Definition: pool.c:56
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:479
ABT_sched_config_var ABT_sched_basic_freq
Definition: basic.c:34
int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC
Retrieve the specific data of the target user-defined scheduler.
Definition: sched.c:278
int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC
Wait on the eventual.
Definition: eventual.c:106
int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC
Set the argument for the ULT function.
Definition: thread.c:1181
int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx, ABT_pool *pools) ABT_API_PUBLIC
Get the pools of the scheduler sched.
Definition: sched.c:164
ABT_sched_type
Definition: abt.h:151
ABT_exec_entity_type
Definition: abt.h:237
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:485
int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC
Create a predefined scheduler.
Definition: sched.c:90
int ABT_self_is_unnamed(ABT_bool *flag) ABT_API_PUBLIC
Check if the running work unit is unnamed.
Definition: self.c:224
#define ABT_API_PUBLIC
Definition: abt.h:14
int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC
Free the mutex attribute object.
Definition: mutex_attr.c:57
int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC
Start the timer.
Definition: timer.c:121
int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC
Get the last pool&#39;s ID of calling work unit.
Definition: self.c:116
int ABT_pool_create(ABT_pool_def *def, ABT_pool_config config, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool and return its handle through newpool.
Definition: pool.c:31
int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC
Retrieve the argument for the ULT function.
Definition: thread.c:1203
int ABT_xstream_get_state(ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC
Return the state of xstream.
Definition: stream.c:587
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:483
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:455
int ABT_mutex_attr_create(ABT_mutex_attr *newattr) ABT_API_PUBLIC
Create a new mutex attribute object.
Definition: mutex_attr.c:26
ABT_unit_create_from_thread_fn u_create_from_thread
Definition: abt.h:496
struct ABT_sched_config_opaque * ABT_sched_config
Definition: abt.h:321
int ABT_self_is_primary(ABT_bool *flag) ABT_API_PUBLIC
Check if the caller is the primary ULT.
Definition: self.c:62
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition.
Definition: cond.c:260
int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC
Unlock the mutex.
Definition: mutex.c:318
int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC
Restart an ES that has been joined by ABT_xstream_join().
Definition: stream.c:173
ABT_sched_get_migr_pool_fn get_migr_pool
Definition: abt.h:466
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
Definition: abt.h:474
int ABT_xstream_set_main_sched(ABT_xstream xstream, ABT_sched sched) ABT_API_PUBLIC
Set the main scheduler of the target ES.
Definition: stream.c:444
int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC
Attempt to lock a mutex without blocking.
Definition: mutex.c:231
int ABT_xstream_barrier_free(ABT_xstream_barrier *barrier) ABT_API_PUBLIC
Free the ES barrier.
int ABT_thread_create_on_xstream(ABT_xstream xstream, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC
Create a new ULT associated with the target ES (xstream).
Definition: thread.c:127
int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex without context switch.
Definition: mutex.c:278
int ABT_thread_yield_to(ABT_thread thread) ABT_API_PUBLIC
Yield the processor from the current running thread to the specific thread.
Definition: thread.c:629
double ABT_get_wtime(void) ABT_API_PUBLIC
Get elapsed wall clock time.
Definition: timer.c:24
int ABT_sched_config_create(ABT_sched_config *config,...) ABT_API_PUBLIC
Create a scheduler configuration.
Definition: config.c:61
int ABT_eventual_test(ABT_eventual eventual, void **value, int *is_ready) ABT_API_PUBLIC
Test the readiness of an eventual.
Definition: eventual.c:187
int ABT_thread_is_unnamed(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC
Check if the target ULT is unnamed.
Definition: thread.c:1096
int ABT_thread_get_last_xstream(ABT_thread thread, ABT_xstream *xstream) ABT_API_PUBLIC
Get the ES associated with the target thread.
Definition: thread.c:515
struct ABT_pool_config_opaque * ABT_pool_config
Definition: abt.h:331
ABT_thread_state
Definition: abt.h:125
ABT_unit_get_type_fn u_get_type
Definition: abt.h:492
ABT_pool_get_size_fn p_get_size
Definition: abt.h:502
ABT_pool_pop_wait_fn p_pop_wait
Definition: abt.h:505
int ABT_thread_get_id(ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC
Get the ULT&#39;s id.
Definition: thread.c:1161
int ABT_thread_get_specific(ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC
Get the ULT-specific value associated with the key.
Definition: thread.c:1257
ABT_info_query_kind
Definition: abt.h:180
ABT_sched_config_var ABT_sched_config_var_end
Definition: config.c:19
int ABT_future_reset(ABT_future future) ABT_API_PUBLIC
Reset the readiness of the target future.
Definition: futures.c:299
ABT_sched_run_fn run
Definition: abt.h:464
int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread *thread) ABT_API_PUBLIC
Revive the ULT.
Definition: thread.c:251
int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Return the total size of a pool.
Definition: pool.c:119
ABT_sync_event_type
Definition: abt.h:244
int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result) ABT_API_PUBLIC
Compare two ULT handles for equality.
Definition: thread.c:1120
void(* ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
Definition: abt.h:517
int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock the rwlock as a reader.
Definition: rwlock.c:92
int ABT_unit_set_associated_pool(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
Set the associated pool for the target work unit.
Definition: unit.c:27
int ABT_sched_set_data(ABT_sched sched, void *data) ABT_API_PUBLIC
Set the specific data of the target user-defined scheduler.
Definition: sched.c:257
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
Definition: abt.h:472
ABT_pool_remove_fn p_remove
Definition: abt.h:509
int ABT_sched_has_to_stop(ABT_sched sched, ABT_bool *stop) ABT_API_PUBLIC
Check if the scheduler needs to stop.
Definition: sched.c:235
int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC
Create an eventual.
Definition: eventual.c:32
int ABT_xstream_run_unit(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC
Execute a unit on the local ES.
Definition: stream.c:686
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
Definition: abt.h:471
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Return the handle of the calling ULT.
Definition: thread.c:464
ABT_pool_print_all_fn p_print_all
Definition: abt.h:511
int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2, ABT_bool *result) ABT_API_PUBLIC
Compare two ES handles for equality.
Definition: stream.c:611
ABT_pool_pop_timedwait_fn p_pop_timedwait
Definition: abt.h:506
int ABT_thread_migrate_to_sched(ABT_thread thread, ABT_sched sched) ABT_API_PUBLIC
Migrate a thread to a specific scheduler.
Definition: thread.c:830
int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC
Signal the eventual.
Definition: eventual.c:222
int ABT_tool_register_task_callback(ABT_tool_task_callback_fn cb_func, uint64_t event_mask_task, void *user_arg) ABT_API_PUBLIC
Register a callback function for tasklet events.
Definition: tool.c:87
int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with the key.
Definition: key.c:93
int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC
Signal a condition.
Definition: cond.c:206
int ABT_initialized(void) ABT_API_PUBLIC
Check whether ABT_init() has been called.
Definition: global.c:96
int ABT_self_on_primary_xstream(ABT_bool *flag) ABT_API_PUBLIC
Check if the caller&#39;s ES is the primary ES.
Definition: self.c:87
struct ABT_cond_opaque * ABT_cond
Definition: abt.h:361
struct ABT_timer_opaque * ABT_timer
Definition: abt.h:371