ARGOBOTS
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.0"
51 #define ABT_NUMVERSION 10000300
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 /* Memeory 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 18 /* Invalid tasklet */
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_XSTREAM 29 /* ES-related error */
94 #define ABT_ERR_XSTREAM_STATE 30 /* ES state error */
95 #define ABT_ERR_XSTREAM_BARRIER 31 /* ES barrier-related error */
96 #define ABT_ERR_SCHED 32 /* Scheduler-related error */
97 #define ABT_ERR_SCHED_CONFIG 33 /* Scheduler config error */
98 #define ABT_ERR_POOL 34 /* Pool-related error */
99 #define ABT_ERR_UNIT 35 /* Scheduling unit-related error */
100 #define ABT_ERR_THREAD 36 /* ULT-related error */
101 #define ABT_ERR_TASK 37 /* Task-related error */
102 #define ABT_ERR_KEY 38 /* Key-related error */
103 #define ABT_ERR_MUTEX 39 /* Mutex-related error */
104 #define ABT_ERR_MUTEX_LOCKED 40 /* Return value when mutex is locked */
105 #define ABT_ERR_COND 41 /* Condition-related error */
106 #define ABT_ERR_COND_TIMEDOUT 42 /* Return value when cond is timed out */
107 #define ABT_ERR_RWLOCK 43 /* rwlock-related error */
108 #define ABT_ERR_EVENTUAL 44 /* Eventual-related error */
109 #define ABT_ERR_FUTURE 45 /* Future-related error */
110 #define ABT_ERR_BARRIER 46 /* Barrier-related error */
111 #define ABT_ERR_TIMER 47 /* Timer-related error */
112 #define ABT_ERR_MIGRATION_TARGET 48 /* Migration target error */
113 #define ABT_ERR_MIGRATION_NA 49 /* Migration not available */
114 #define ABT_ERR_MISSING_JOIN 50 /* An ES or more did not join */
115 #define ABT_ERR_FEATURE_NA 51 /* Feature not available */
116 
117 
118 /* Constants */
122 };
123 
129 };
130 
135 };
136 
142 };
143 
145  ABT_SCHED_DEFAULT, /* Default scheduler */
146  ABT_SCHED_BASIC, /* Basic scheduler */
147  ABT_SCHED_PRIO, /* Priority scheduler */
148  ABT_SCHED_RANDWS, /* Random work-stealing scheduler */
149  ABT_SCHED_BASIC_WAIT /* Basic scheduler with ability to wait for units */
150 };
151 
153  ABT_SCHED_TYPE_ULT, /* can yield */
154  ABT_SCHED_TYPE_TASK /* cannot yield */
155 };
156 
158  ABT_POOL_FIFO, /* FIFO pool */
159  ABT_POOL_FIFO_WAIT /* FIFO pool with ability to wait for units */
160 };
161 
163  ABT_POOL_ACCESS_PRIV, /* Used by only one ES */
164  ABT_POOL_ACCESS_SPSC, /* Producers on ES1, consumers on ES2 */
165  ABT_POOL_ACCESS_MPSC, /* Producers on any ES, consumers on the same ES */
166  ABT_POOL_ACCESS_SPMC, /* Producers on the same ES, consumers on any ES */
167  ABT_POOL_ACCESS_MPMC /* Producers on any ES, consumers on any ES */
168 };
169 
174  ABT_UNIT_TYPE_EXT /* External thread */
175 };
176 
178  /* Whether the debug mode is enabled or not */
180  /* Whether Argobots prints an error number when an error happens or not */
182  /* Whether Argobots prints a debug message or not */
184  /* Whether Argobots is configured to be Valgrind friendly */
186  /* Whether an error is checked or not */
188  /* Whether a pool access violation regarding producer is checked or not */
190  /* Whether a pool access violation regarding consumer is checked or not */
192  /* Whether floating-point registers are saved on context switching or not */
194  /* Whether the thread cancellation feature is supported or not */
196  /* Whether the task cancellation feature is supported or not */
198  /* Whether the thread and task migration feature is supported or not */
200  /* Whether the stackable scheduler feature is supported or not */
202  /* Whether the external thread feature is supported or not */
204  /* Whether a predefined scheduler sleeps or not */
206  /* Whether the Argobots configuration is printed on ABT_init() or not */
208  /* Whether the affinity setting is supported or not */
210  /* The maximum number of execution streams */
212  /* Default stack size of ULTs */
214  /* Default stack size of ULT-type schedulers */
216  /* Default event-checking frequency of a predefined scheduler */
218  /* Default sleep time of a predefined scheduler */
220 };
221 
222 /* Constants for ABT_bool */
223 #define ABT_TRUE 1
224 #define ABT_FALSE 0
225 
226 /* Rank representing any ES */
227 #define ABT_XSTREAM_ANY_RANK -1
228 
229 /* Data Types */
230 struct ABT_xstream_opaque;
231 struct ABT_xstream_barrier_opaque;
232 struct ABT_sched_opaque;
233 struct ABT_sched_config_opaque;
234 struct ABT_pool_opaque;
235 struct ABT_pool_config_opaque;
236 struct ABT_unit_opaque;
237 struct ABT_thread_opaque;
238 struct ABT_thread_attr_opaque;
239 struct ABT_task_opaque;
240 struct ABT_key_opaque;
241 struct ABT_mutex_opaque;
242 struct ABT_mutex_attr_opaque;
243 struct ABT_cond_opaque;
244 struct ABT_rwlock_opaque;
245 struct ABT_eventual_opaque;
246 struct ABT_future_opaque;
247 struct ABT_barrier_opaque;
248 struct ABT_timer_opaque;
249 
250 /* Execution Stream */
251 typedef struct ABT_xstream_opaque * ABT_xstream;
252 /* ES state */
254 /* ES barrier */
255 typedef struct ABT_xstream_barrier_opaque * ABT_xstream_barrier;
256 /* Scheduler */
257 typedef struct ABT_sched_opaque * ABT_sched;
258 /* Sched-specific config */
259 typedef struct ABT_sched_config_opaque * ABT_sched_config;
260 /* Predefined scheduler */
262 /* Scheduler state */
264 /* Scheduler type */
266 /* Pool */
267 typedef struct ABT_pool_opaque * ABT_pool;
268 /* Specific pool config */
269 typedef struct ABT_pool_config_opaque * ABT_pool_config;
270 /* Pool kind */
272 /* Pool access mode */
274 /* Unit */
275 typedef struct ABT_unit_opaque * ABT_unit;
276 /* Unit type */
278 /* User-Level Thread (ULT) */
279 typedef struct ABT_thread_opaque * ABT_thread;
280 /* ULT attribute */
281 typedef struct ABT_thread_attr_opaque * ABT_thread_attr;
282 /* ULT state */
284 /* Tasklet state */
286 /* ULT id */
287 typedef uint64_t ABT_thread_id;
288 /* Tasklet */
289 typedef struct ABT_task_opaque * ABT_task;
290 /* WU-specific data key */
291 typedef struct ABT_key_opaque * ABT_key;
292 /* Mutex */
293 typedef struct ABT_mutex_opaque * ABT_mutex;
294 /* Mutex attribute */
295 typedef struct ABT_mutex_attr_opaque * ABT_mutex_attr;
296 /* Condition variable */
297 typedef struct ABT_cond_opaque * ABT_cond;
298 /* Readers writer lock */
299 typedef struct ABT_rwlock_opaque * ABT_rwlock;
300 /* Eventual */
301 typedef struct ABT_eventual_opaque * ABT_eventual;
302 /* Future */
303 typedef struct ABT_future_opaque * ABT_future;
304 /* Barrier */
305 typedef struct ABT_barrier_opaque * ABT_barrier;
306 /* Timer */
307 typedef struct ABT_timer_opaque * ABT_timer;
308 /* Boolean type */
309 typedef int ABT_bool;
310 /* Query kind */
312 
313 
314 /* Null Object Handles */
315 #define ABT_NULL 0
316 #if ABT_NULL == 1
317 #define ABT_XSTREAM_NULL ((ABT_xstream) NULL)
318 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)NULL)
319 #define ABT_SCHED_NULL ((ABT_sched) NULL)
320 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) NULL)
321 #define ABT_POOL_NULL ((ABT_pool) NULL)
322 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) NULL)
323 #define ABT_UNIT_NULL ((ABT_unit) NULL)
324 #define ABT_THREAD_NULL ((ABT_thread) NULL)
325 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) NULL)
326 #define ABT_TASK_NULL ((ABT_task) NULL)
327 #define ABT_KEY_NULL ((ABT_key) NULL)
328 #define ABT_MUTEX_NULL ((ABT_mutex) NULL)
329 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) NULL)
330 #define ABT_COND_NULL ((ABT_cond) NULL)
331 #define ABT_RWLOCK_NULL ((ABT_rwlock) NULL)
332 #define ABT_EVENTUAL_NULL ((ABT_eventual) NULL)
333 #define ABT_FUTURE_NULL ((ABT_future) NULL)
334 #define ABT_BARRIER_NULL ((ABT_barrier) NULL)
335 #define ABT_TIMER_NULL ((ABT_timer) NULL)
336 #else
337 #define ABT_XSTREAM_NULL ((ABT_xstream) (0x01))
338 #define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02))
339 #define ABT_SCHED_NULL ((ABT_sched) (0x03))
340 #define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04))
341 #define ABT_POOL_NULL ((ABT_pool) (0x05))
342 #define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06))
343 #define ABT_UNIT_NULL ((ABT_unit) (0x07))
344 #define ABT_THREAD_NULL ((ABT_thread) (0x08))
345 #define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09))
346 #define ABT_TASK_NULL ((ABT_task) (0x0a))
347 #define ABT_KEY_NULL ((ABT_key) (0x0b))
348 #define ABT_MUTEX_NULL ((ABT_mutex) (0x0c))
349 #define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d))
350 #define ABT_COND_NULL ((ABT_cond) (0x0e))
351 #define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f))
352 #define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10))
353 #define ABT_FUTURE_NULL ((ABT_future) (0x11))
354 #define ABT_BARRIER_NULL ((ABT_barrier) (0x12))
355 #define ABT_TIMER_NULL ((ABT_timer) (0x13))
356 #endif
357 
358 /* Scheduler config */
359 typedef enum {
360  ABT_SCHED_CONFIG_INT = 0, /* Parameter of type int */
361  ABT_SCHED_CONFIG_DOUBLE = 1, /* Parameter of type double */
362  ABT_SCHED_CONFIG_PTR = 2, /* Parameter of type pointer */
364 
365 typedef struct {
366  int idx;
369 
371  /* To mark the last parameter in ABT_sched_config_create */
373  /* To configure the frequency for checking events of the basic scheduler */
375  /* To configure the access type of the pools created automatically */
377  /* To configure whether ths scheduler is freed automatically or not */
378 
379 /* Scheduler Functions */
381 typedef void (*ABT_sched_run_fn)(ABT_sched);
382 typedef int (*ABT_sched_free_fn)(ABT_sched);
383 /* To get a pool ready for receiving a migration */
385 
386 typedef struct {
387  ABT_sched_type type; /* ULT or tasklet */
388 
389  /* Functions of the scheduler */
394 } ABT_sched_def;
395 
396 /* Pool Functions */
403 typedef void (*ABT_unit_free_fn)(ABT_unit *);
405 typedef size_t (*ABT_pool_get_size_fn)(ABT_pool);
410 typedef int (*ABT_pool_free_fn)(ABT_pool);
411 typedef int (*ABT_pool_print_all_fn)(ABT_pool, void *arg,
412  void (*)(void*, ABT_unit));
413 
414 typedef struct {
415  ABT_pool_access access; /* Access type */
416 
417  /* Functions to manage units */
425 
426  /* Functions to manage the pool */
435 } ABT_pool_def;
436 
437 
438 /* Init & Finalize */
439 int ABT_init(int argc, char **argv) ABT_API_PUBLIC;
440 int ABT_finalize(void) ABT_API_PUBLIC;
441 int ABT_initialized(void) ABT_API_PUBLIC;
442 
443 /* Execution Stream (ES) */
444 int ABT_xstream_create(ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC;
445 int ABT_xstream_create_basic(ABT_sched_predef predef, int num_pools,
446  ABT_pool *pools, ABT_sched_config config,
447  ABT_xstream *newxstream) ABT_API_PUBLIC;
448 int ABT_xstream_create_with_rank(ABT_sched sched, int rank,
449  ABT_xstream *newxstream) ABT_API_PUBLIC;
450 int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC;
451 int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC;
452 int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC;
453 int ABT_xstream_exit(void) ABT_API_PUBLIC;
454 int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC;
455 int ABT_xstream_self(ABT_xstream *xstream) ABT_API_PUBLIC;
456 int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC;
457 int ABT_xstream_set_rank(ABT_xstream xstream, const int rank) ABT_API_PUBLIC;
458 int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC;
459 int ABT_xstream_set_main_sched(ABT_xstream xstream, ABT_sched sched) ABT_API_PUBLIC;
460 int ABT_xstream_set_main_sched_basic(ABT_xstream xstream,
461  ABT_sched_predef predef,
462  int num_pools, ABT_pool *pools) ABT_API_PUBLIC;
463 int ABT_xstream_get_main_sched(ABT_xstream xstream, ABT_sched *sched) ABT_API_PUBLIC;
464 int ABT_xstream_get_main_pools(ABT_xstream xstream, int max_pools,
465  ABT_pool *pools) ABT_API_PUBLIC;
466 int ABT_xstream_get_state(ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC;
467 int ABT_xstream_equal(ABT_xstream xstream1, ABT_xstream xstream2,
468  ABT_bool *result) ABT_API_PUBLIC;
469 int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC;
470 int ABT_xstream_is_primary(ABT_xstream xstream, ABT_bool *flag) ABT_API_PUBLIC;
471 int ABT_xstream_run_unit(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC;
472 int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC;
473 int ABT_xstream_set_cpubind(ABT_xstream xstream, int cpuid) ABT_API_PUBLIC;
474 int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC;
475 int ABT_xstream_set_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset)
476  ABT_API_PUBLIC;
477 int ABT_xstream_get_affinity(ABT_xstream xstream, int cpuset_size, int *cpuset,
478  int *num_cpus) ABT_API_PUBLIC;
479 
480 /* ES Barrier */
481 int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier)
482  ABT_API_PUBLIC;
483 int ABT_xstream_barrier_free(ABT_xstream_barrier *barrier) ABT_API_PUBLIC;
484 int ABT_xstream_barrier_wait(ABT_xstream_barrier barrier) ABT_API_PUBLIC;
485 
486 /* Scheduler */
487 int ABT_sched_create(ABT_sched_def *def, int num_pools, ABT_pool *pools,
488  ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC;
489 int ABT_sched_create_basic(ABT_sched_predef predef, int num_pools,
490  ABT_pool *pools, ABT_sched_config config,
491  ABT_sched *newsched) ABT_API_PUBLIC;
492 int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC;
493 int ABT_sched_set_data(ABT_sched sched, void *data) ABT_API_PUBLIC;
494 int ABT_sched_get_data(ABT_sched sched, void **data) ABT_API_PUBLIC;
495 int ABT_sched_get_num_pools(ABT_sched sched, int *num_pools) ABT_API_PUBLIC;
496 int ABT_sched_get_pools(ABT_sched sched, int max_pools, int idx,
497  ABT_pool *pools) ABT_API_PUBLIC;
498 int ABT_sched_get_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
499 int ABT_sched_get_total_size(ABT_sched sched, size_t *size) ABT_API_PUBLIC;
500 int ABT_sched_finish(ABT_sched sched) ABT_API_PUBLIC;
501 int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC;
502 int ABT_sched_has_to_stop(ABT_sched sched, ABT_bool *stop) ABT_API_PUBLIC;
503 
504 /* Scheduler config */
505 int ABT_sched_config_create(ABT_sched_config *config, ...) ABT_API_PUBLIC;
506 int ABT_sched_config_read(ABT_sched_config config, int num_vars, ...) ABT_API_PUBLIC;
507 int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC;
508 
509 /* Pool */
510 int ABT_pool_create(ABT_pool_def *def, ABT_pool_config config,
511  ABT_pool *newpool) ABT_API_PUBLIC;
512 int ABT_pool_create_basic(ABT_pool_kind kind, ABT_pool_access access,
513  ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC;
514 int ABT_pool_free(ABT_pool *pool) ABT_API_PUBLIC;
515 int ABT_pool_get_access(ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC;
516 int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
517 int ABT_pool_get_total_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC;
518 int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC;
519 int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs) ABT_API_PUBLIC;
520 int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC;
521 int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC;
522 int ABT_pool_print_all(ABT_pool pool, void *arg,
523  void (*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC;
524 int ABT_pool_set_data(ABT_pool pool, void *data) ABT_API_PUBLIC;
525 int ABT_pool_get_data(ABT_pool pool, void **data) ABT_API_PUBLIC;
526 int ABT_pool_add_sched(ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC;
527 int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC;
528 
529 /* Work Unit */
530 int ABT_unit_set_associated_pool(ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC;
531 
532 /* User-level Thread (ULT) */
533 int ABT_thread_create(ABT_pool pool, void (*thread_func)(void *), void *arg,
534  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
535 int ABT_thread_create_on_xstream(ABT_xstream xstream,
536  void (*thread_func)(void *), void *arg,
537  ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC;
538 int ABT_thread_create_many(int num, ABT_pool *pool_list,
539  void (**thread_func_list)(void *), void **arg_list,
540  ABT_thread_attr attr, ABT_thread *newthread_list)
541  ABT_API_PUBLIC;
542 int ABT_thread_revive(ABT_pool pool, void(*thread_func)(void *), void *arg,
543  ABT_thread *thread) ABT_API_PUBLIC;
544 int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC;
545 int ABT_thread_free_many(int num, ABT_thread *thread_list) ABT_API_PUBLIC;
546 int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC;
547 int ABT_thread_join_many(int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC;
548 int ABT_thread_exit(void) ABT_API_PUBLIC;
549 int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC;
550 int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC;
551 int ABT_thread_self_id(ABT_thread_id *id) ABT_API_PUBLIC;
552 int ABT_thread_get_state(ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC;
553 int ABT_thread_get_last_pool(ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC;
554 int ABT_thread_get_last_pool_id(ABT_thread thread, int *id) ABT_API_PUBLIC;
555 int ABT_thread_set_associated_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC;
556 int ABT_thread_yield_to(ABT_thread thread) ABT_API_PUBLIC;
557 int ABT_thread_yield(void) ABT_API_PUBLIC;
558 int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC;
559 int ABT_thread_migrate_to_xstream(ABT_thread thread, ABT_xstream xstream) ABT_API_PUBLIC;
560 int ABT_thread_migrate_to_sched(ABT_thread thread, ABT_sched sched) ABT_API_PUBLIC;
561 int ABT_thread_migrate_to_pool(ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC;
562 int ABT_thread_migrate(ABT_thread thread) ABT_API_PUBLIC;
563 int ABT_thread_set_callback(ABT_thread thread,
564  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
565 int ABT_thread_set_migratable(ABT_thread thread, ABT_bool flag) ABT_API_PUBLIC;
566 int ABT_thread_is_migratable(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC;
567 int ABT_thread_is_primary(ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC;
568 int ABT_thread_equal(ABT_thread thread1, ABT_thread thread2, ABT_bool *result)
569  ABT_API_PUBLIC;
570 int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC;
571 int ABT_thread_get_id(ABT_thread thread, ABT_thread_id *thread_id) ABT_API_PUBLIC;
572 int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC;
573 int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC;
574 int ABT_thread_get_attr(ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC;
575 
576 /* ULT Attributes */
577 int ABT_thread_attr_create(ABT_thread_attr *newattr) ABT_API_PUBLIC;
578 int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC;
579 int ABT_thread_attr_set_stack(ABT_thread_attr attr, void *stackaddr,
580  size_t stacksize) ABT_API_PUBLIC;
581 int ABT_thread_attr_get_stack(ABT_thread_attr attr, void **stackaddr,
582  size_t *stacksize) ABT_API_PUBLIC;
583 int ABT_thread_attr_set_stacksize(ABT_thread_attr attr, size_t stacksize) ABT_API_PUBLIC;
584 int ABT_thread_attr_get_stacksize(ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC;
585 int ABT_thread_attr_set_callback(ABT_thread_attr attr,
586  void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC;
587 int ABT_thread_attr_set_migratable(ABT_thread_attr attr, ABT_bool flag) ABT_API_PUBLIC;
588 
589 /* Tasklet */
590 int ABT_task_create(ABT_pool pool, void (*task_func)(void *), void *arg,
591  ABT_task *newtask) ABT_API_PUBLIC;
592 int ABT_task_create_on_xstream(ABT_xstream xstream, void (*task_func)(void *),
593  void *arg, ABT_task *newtask) ABT_API_PUBLIC;
594 int ABT_task_revive(ABT_pool pool, void (*task_func)(void *), void *arg,
595  ABT_task *task) ABT_API_PUBLIC;
596 int ABT_task_free(ABT_task *task) ABT_API_PUBLIC;
597 int ABT_task_join(ABT_task task) ABT_API_PUBLIC;
598 int ABT_task_cancel(ABT_task task) ABT_API_PUBLIC;
599 int ABT_task_self(ABT_task *task) ABT_API_PUBLIC;
600 int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC;
601 int ABT_task_get_xstream(ABT_task task, ABT_xstream *xstream) ABT_API_PUBLIC;
602 int ABT_task_get_state(ABT_task task, ABT_task_state *state) ABT_API_PUBLIC;
603 int ABT_task_get_last_pool(ABT_task task, ABT_pool *pool) ABT_API_PUBLIC;
604 int ABT_task_get_last_pool_id(ABT_task task, int *id) ABT_API_PUBLIC;
605 int ABT_task_set_migratable(ABT_task task, ABT_bool flag) ABT_API_PUBLIC;
606 int ABT_task_is_migratable(ABT_task task, ABT_bool *flag) ABT_API_PUBLIC;
607 int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC;
608 int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC;
609 int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC;
610 
611 /* Self */
612 int ABT_self_get_type(ABT_unit_type *type) ABT_API_PUBLIC;
613 int ABT_self_is_primary(ABT_bool *flag) ABT_API_PUBLIC;
614 int ABT_self_on_primary_xstream(ABT_bool *flag) ABT_API_PUBLIC;
615 int ABT_self_get_last_pool_id(int *pool_id) ABT_API_PUBLIC;
616 int ABT_self_suspend(void) ABT_API_PUBLIC;
617 int ABT_self_set_arg(void *arg) ABT_API_PUBLIC;
618 int ABT_self_get_arg(void **arg) ABT_API_PUBLIC;
619 
620 /* ULT-specific data */
621 int ABT_key_create(void (*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC;
622 int ABT_key_free(ABT_key *key) ABT_API_PUBLIC;
623 int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC;
624 int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC;
625 
626 /* Mutex */
627 int ABT_mutex_create(ABT_mutex *newmutex) ABT_API_PUBLIC;
628 int ABT_mutex_create_with_attr(ABT_mutex_attr attr, ABT_mutex *newmutex) ABT_API_PUBLIC;
629 int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC;
630 int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC;
631 int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC;
632 int ABT_mutex_lock_low(ABT_mutex mutex) ABT_API_PUBLIC;
633 int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC;
634 int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC;
635 int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC;
636 int ABT_mutex_unlock_se(ABT_mutex mutex) ABT_API_PUBLIC;
637 int ABT_mutex_unlock_de(ABT_mutex mutex) ABT_API_PUBLIC;
638 int ABT_mutex_equal(ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC;
639 
640 /* Mutex Attributes */
641 int ABT_mutex_attr_create(ABT_mutex_attr *newattr) ABT_API_PUBLIC;
642 int ABT_mutex_attr_free(ABT_mutex_attr *attr) ABT_API_PUBLIC;
643 int ABT_mutex_attr_set_recursive(ABT_mutex_attr attr, ABT_bool recursive) ABT_API_PUBLIC;
644 
645 /* Condition variable */
646 int ABT_cond_create(ABT_cond *newcond) ABT_API_PUBLIC;
647 int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC;
648 int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC;
649 int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex,
650  const struct timespec *abstime) ABT_API_PUBLIC;
651 int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC;
652 int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC;
653 
654 /* Readers writer lock */
655 int ABT_rwlock_create(ABT_rwlock *newrwlock) ABT_API_PUBLIC;
656 int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC;
657 int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC;
658 int ABT_rwlock_wrlock(ABT_rwlock rwlock) ABT_API_PUBLIC;
659 int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC;
660 
661 /* Eventual */
662 int ABT_eventual_create(int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC;
663 int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC;
664 int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC;
665 int ABT_eventual_test(ABT_eventual eventual, void **value, int *is_ready) ABT_API_PUBLIC;
666 int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC;
667 int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC;
668 
669 /* Futures */
670 int ABT_future_create(uint32_t compartments, void (*cb_func)(void **arg),
671  ABT_future *newfuture) ABT_API_PUBLIC;
672 int ABT_future_free(ABT_future *future) ABT_API_PUBLIC;
673 int ABT_future_wait(ABT_future future) ABT_API_PUBLIC;
674 int ABT_future_test(ABT_future future, ABT_bool *flag) ABT_API_PUBLIC;
675 int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC;
676 int ABT_future_reset(ABT_future future) ABT_API_PUBLIC;
677 
678 /* Barrier */
679 int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC;
680 int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC;
681 int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC;
682 int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC;
683 int ABT_barrier_get_num_waiters(ABT_barrier barrier, uint32_t *num_waiters)
684  ABT_API_PUBLIC;
685 
686 /* Error */
687 int ABT_error_get_str(int err, char *str, size_t *len) ABT_API_PUBLIC;
688 
689 /* Timer */
690 double ABT_get_wtime(void) ABT_API_PUBLIC;
691 int ABT_timer_create(ABT_timer *newtimer) ABT_API_PUBLIC;
692 int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC;
693 int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC;
694 int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC;
695 int ABT_timer_stop(ABT_timer timer) ABT_API_PUBLIC;
696 int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
697 int ABT_timer_stop_and_read(ABT_timer timer, double *secs) ABT_API_PUBLIC;
698 int ABT_timer_stop_and_add(ABT_timer timer, double *secs) ABT_API_PUBLIC;
699 int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC;
700 
701 /* Information */
702 int ABT_info_query_config(ABT_info_query_kind query_kind,
703  void *val) ABT_API_PUBLIC;
704 int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC;
705 int ABT_info_print_all_xstreams(FILE *fp) ABT_API_PUBLIC;
706 int ABT_info_print_xstream(FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC;
707 int ABT_info_print_sched(FILE *fp, ABT_sched sched) ABT_API_PUBLIC;
708 int ABT_info_print_pool(FILE* fp, ABT_pool pool) ABT_API_PUBLIC;
709 int ABT_info_print_thread(FILE* fp, ABT_thread thread) ABT_API_PUBLIC;
710 int ABT_info_print_thread_attr(FILE* fp, ABT_thread_attr attr) ABT_API_PUBLIC;
711 int ABT_info_print_task(FILE* fp, ABT_task task) ABT_API_PUBLIC;
712 int ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) ABT_API_PUBLIC;
713 int ABT_info_print_thread_stacks_in_pool(FILE *fp, ABT_pool pool) ABT_API_PUBLIC;
714 int ABT_info_trigger_print_all_thread_stacks(FILE *fp, double timeout,
715  void (*cb_func)(ABT_bool, void *),
716  void *arg) ABT_API_PUBLIC;
717 
718 #if defined(__cplusplus)
719 }
720 #endif
721 
722 #endif /* ABT_H_INCLUDED */
int ABT_future_set(ABT_future future, void *value) ABT_API_PUBLIC
Signal the future.
Definition: futures.c:251
int ABT_timer_stop(ABT_timer timer) ABT_API_PUBLIC
Stop the timer.
Definition: timer.c:174
int ABT_mutex_unlock_se(ABT_mutex mutex) ABT_API_PUBLIC
Hand over the mutex within the ES.
Definition: mutex.c:598
int ABT_future_test(ABT_future future, ABT_bool *flag) ABT_API_PUBLIC
Test whether the future is ready.
Definition: futures.c:217
ABT_sched_free_fn free
Definition: abt.h:392
int ABT_init(int argc, char **argv) ABT_API_PUBLIC
Initialize the Argobots execution environment.
Definition: global.c:40
struct ABT_thread_attr_opaque * ABT_thread_attr
Definition: abt.h:281
int ABT_thread_exit(void) ABT_API_PUBLIC
The calling ULT terminates its execution.
Definition: thread.c:430
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:432
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:659
struct ABT_unit_opaque * ABT_unit
Definition: abt.h:275
int ABT_pool_pop(ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC
Pop a unit from the target pool.
Definition: pool.c:203
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:137
struct ABT_mutex_attr_opaque * ABT_mutex_attr
Definition: abt.h:295
int ABT_xstream_self(ABT_xstream *xstream) ABT_API_PUBLIC
Return the ES handle associated with the caller work unit.
Definition: stream.c:557
struct ABT_barrier_opaque * ABT_barrier
Definition: abt.h:305
ABT_unit_get_task_fn u_get_task
Definition: abt.h:420
int ABT_thread_get_state(ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC
Return the state of thread.
Definition: thread.c:597
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:338
ABT_pool_init_fn p_init
Definition: abt.h:427
ABT_sched_predef
Definition: abt.h:144
int ABT_cond_create(ABT_cond *newcond) ABT_API_PUBLIC
Create a new condition variable.
Definition: cond.c:26
struct ABT_xstream_opaque * ABT_xstream
Definition: abt.h:251
struct ABT_sched_opaque * ABT_sched
Definition: abt.h:257
int ABT_sched_finish(ABT_sched sched) ABT_API_PUBLIC
Ask a scheduler to finish.
Definition: sched.c:223
int ABT_eventual_reset(ABT_eventual eventual) ABT_API_PUBLIC
Reset the readiness of the target eventual.
Definition: eventual.c:306
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:550
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:400
int ABT_info_print_config(FILE *fp) ABT_API_PUBLIC
Write the configuration information to the output stream.
Definition: info.c:251
int ABT_barrier_free(ABT_barrier *barrier) ABT_API_PUBLIC
Free the barrier.
Definition: barrier.c:104
int ABT_pool_get_size(ABT_pool pool, size_t *size) ABT_API_PUBLIC
Return the size of a pool.
Definition: pool.c:177
int ABT_pool_pop_timedwait(ABT_pool pool, ABT_unit *unit, double abstime_secs) ABT_API_PUBLIC
Definition: pool.c:226
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:277
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:170
int ABT_self_set_arg(void *arg) ABT_API_PUBLIC
Set the argument for the work unit function.
Definition: self.c:274
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:366
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:26
int ABT_thread_cancel(ABT_thread thread) ABT_API_PUBLIC
Request the cancellation of the target thread.
Definition: thread.c:472
ABT_sched_config_var ABT_sched_config_automatic
Definition: config.c:24
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:97
uint64_t ABT_thread_id
Definition: abt.h:287
ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)
Definition: abt.h:402
int ABT_cond_free(ABT_cond *cond) ABT_API_PUBLIC
Free the condition variable.
Definition: cond.c:52
int ABT_mutex_lock_high(ABT_mutex mutex) ABT_API_PUBLIC
Definition: mutex.c:312
int ABT_xstream_get_num(int *num_xstreams) ABT_API_PUBLIC
Return the number of current existing ESs.
Definition: stream.c:937
int ABT_task_cancel(ABT_task task) ABT_API_PUBLIC
Request the cancellation of the target task.
Definition: task.c:302
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:269
int ABT_thread_free(ABT_thread *thread) ABT_API_PUBLIC
Release the thread object associated with thread handle.
Definition: thread.c:295
ABT_xstream_state
Definition: abt.h:119
int ABT_mutex_free(ABT_mutex *mutex) ABT_API_PUBLIC
Free the mutex object.
Definition: mutex.c:102
int ABT_thread_get_attr(ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC
Get attributes of the target ULT.
Definition: thread.c:1394
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:27
int ABT_mutex_lock_low(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex with low priority.
Definition: mutex.c:277
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:65
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:199
int ABT_barrier_create(uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC
Create a new barrier.
Definition: barrier.c:26
ABT_unit(* ABT_pool_pop_fn)(ABT_pool)
Definition: abt.h:407
struct ABT_task_opaque * ABT_task
Definition: abt.h:289
int ABT_thread_resume(ABT_thread thread) ABT_API_PUBLIC
Resume the target ULT.
Definition: thread.c:871
ABT_sched_config_var ABT_sched_config_access
Definition: config.c:21
ABT_sched_init_fn init
Definition: abt.h:390
int ABT_xstream_self_rank(int *rank) ABT_API_PUBLIC
Return the rank of ES associated with the caller work unit.
Definition: stream.c:600
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:228
size_t(* ABT_pool_get_size_fn)(ABT_pool)
Definition: abt.h:405
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:44
int ABT_timer_dup(ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC
Duplicate the timer.
Definition: timer.c:76
int ABT_xstream_get_rank(ABT_xstream xstream, int *rank) ABT_API_PUBLIC
Return the rank of ES.
Definition: stream.c:670
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:310
int ABT_bool
Definition: abt.h:309
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:36
int ABT_task_join(ABT_task task) ABT_API_PUBLIC
Wait for the tasklet to terminate.
Definition: task.c:266
ABT_unit_get_thread_fn u_get_thread
Definition: abt.h:419
int ABT_key_get(ABT_key key, void **value) ABT_API_PUBLIC
Get the value associated with the key.
Definition: key.c:173
ABT_pool_pop_fn p_pop
Definition: abt.h:430
int ABT_rwlock_unlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Unlock the rwlock.
Definition: rwlock.c:162
int ABT_thread_migrate(ABT_thread thread) ABT_API_PUBLIC
Request migration of the thread to an any available ES.
Definition: thread.c:1049
int ABT_xstream_cancel(ABT_xstream xstream) ABT_API_PUBLIC
Request the cancellation of the target ES.
Definition: stream.c:524
void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)
Definition: abt.h:406
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:825
int ABT_cond_timedwait(ABT_cond cond, ABT_mutex mutex, const struct timespec *abstime) ABT_API_PUBLIC
Wait on the condition.
Definition: cond.c:176
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:969
ABT_pool_access access
Definition: abt.h:415
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:909
int ABT_self_get_type(ABT_unit_type *type) ABT_API_PUBLIC
Return the type of calling work unit.
Definition: self.c:31
int ABT_task_self(ABT_task *task) ABT_API_PUBLIC
Return the handle of the calling tasklet.
Definition: task.c:337
int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC
Wait on the condition.
Definition: cond.c:92
struct ABT_pool_opaque * ABT_pool
Definition: abt.h:267
ABT_unit_is_in_pool_fn u_is_in_pool
Definition: abt.h:421
ABT_pool_push_fn p_push
Definition: abt.h:429
int ABT_sched_exit(ABT_sched sched) ABT_API_PUBLIC
Ask a scheduler to stop as soon as possible.
Definition: sched.c:252
struct ABT_mutex_opaque * ABT_mutex
Definition: abt.h:293
int ABT_timer_read(ABT_timer timer, double *secs) ABT_API_PUBLIC
Read the elapsed time of the timer.
Definition: timer.c:204
int ABT_key_free(ABT_key *key) ABT_API_PUBLIC
Free an WU-specific data key.
Definition: key.c:76
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:53
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:1113
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:162
struct ABT_rwlock_opaque * ABT_rwlock
Definition: abt.h:299
ABT_task(* ABT_unit_get_task_fn)(ABT_unit)
Definition: abt.h:399
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:189
struct ABT_key_opaque * ABT_key
Definition: abt.h:291
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:398
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:680
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:135
int ABT_mutex_unlock_de(ABT_mutex mutex) ABT_API_PUBLIC
Definition: mutex.c:634
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:35
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:423
int ABT_timer_get_overhead(double *overhead) ABT_API_PUBLIC
Obtain the overhead time of using ABT_timer.
Definition: timer.c:312
ABT_task_state
Definition: abt.h:131
int ABT_thread_yield(void) ABT_API_PUBLIC
Yield the processor from the current running ULT back to the scheduler.
Definition: thread.c:825
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:787
int ABT_thread_get_last_pool(ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC
Return the last pool of ULT.
Definition: thread.c:627
struct ABT_thread_opaque * ABT_thread
Definition: abt.h:279
ABT_sched_config_type type
Definition: abt.h:367
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:162
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:475
int ABT_future_free(ABT_future *future) ABT_API_PUBLIC
Free the future object.
Definition: futures.c:88
int ABT_thread_self_id(ABT_thread_id *id) ABT_API_PUBLIC
Return the calling ULT&#39;s ID.
Definition: thread.c:559
int ABT_pool_get_id(ABT_pool pool, int *id) ABT_API_PUBLIC
Get the ID of the target pool.
Definition: pool.c:523
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:855
int ABT_rwlock_free(ABT_rwlock *rwlock) ABT_API_PUBLIC
Free the rwlock object.
Definition: rwlock.c:59
ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)
Definition: abt.h:384
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:268
int ABT_task_equal(ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC
Compare two tasklet handles for equality.
Definition: task.c:615
int ABT_thread_free_many(int num, ABT_thread *thread_list) ABT_API_PUBLIC
Release a set of ULT objects.
Definition: thread.c:348
int ABT_future_wait(ABT_future future) ABT_API_PUBLIC
Wait on the future.
Definition: futures.c:127
int(* ABT_sched_free_fn)(ABT_sched)
Definition: abt.h:382
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:132
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:146
int ABT_info_print_task(FILE *fp, ABT_task task) ABT_API_PUBLIC
Write the information of the target tasklet to the output stream.
Definition: info.c:451
int ABT_barrier_reinit(ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC
Reinitialize the barrier.
Definition: barrier.c:60
ABT_sched_config_type
Definition: abt.h:359
int ABT_thread_get_stacksize(ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC
Get the ULT&#39;s stack size.
Definition: thread.c:1275
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:369
int ABT_task_get_id(ABT_task task, uint64_t *task_id) ABT_API_PUBLIC
Get the tasklet&#39;s id.
Definition: task.c:634
ABT_pool_free_fn p_free
Definition: abt.h:433
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:1187
int ABT_xstream_join(ABT_xstream xstream) ABT_API_PUBLIC
Wait for xstream to terminate.
Definition: stream.c:443
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:108
int ABT_xstream_check_events(ABT_sched sched) ABT_API_PUBLIC
Check the events and process them.
Definition: stream.c:1063
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:1193
int ABT_timer_free(ABT_timer *timer) ABT_API_PUBLIC
Free the timer object.
Definition: timer.c:113
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:89
int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)
Definition: abt.h:380
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:1132
int ABT_finalize(void) ABT_API_PUBLIC
Terminate the Argobots execution environment.
Definition: global.c:135
ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)
Definition: abt.h:400
ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)
Definition: abt.h:397
int ABT_xstream_get_cpubind(ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC
Get the CPU binding for the target ES.
Definition: stream.c:1162
ABT_unit_free_fn u_free
Definition: abt.h:424
int ABT_sched_free(ABT_sched *sched) ABT_API_PUBLIC
Release the scheduler object associated with sched handle.
Definition: sched.c:127
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Definition: abt.h:255
ABT_pool_access
Definition: abt.h:162
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:1230
int ABT_task_get_last_pool(ABT_task task, ABT_pool *pool) ABT_API_PUBLIC
Return the last pool of task.
Definition: task.c:480
int ABT_eventual_free(ABT_eventual *eventual) ABT_API_PUBLIC
Free the eventual object.
Definition: eventual.c:62
int ABT_task_set_migratable(ABT_task task, ABT_bool flag) ABT_API_PUBLIC
Set the tasklet&#39;s migratability.
Definition: task.c:546
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:1223
int ABT_xstream_exit(void) ABT_API_PUBLIC
Terminate the ES associated with the calling ULT.
Definition: stream.c:473
ABT_unit_type
Definition: abt.h:170
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:182
int ABT_thread_set_migratable(ABT_thread thread, ABT_bool flag) ABT_API_PUBLIC
Set the ULT&#39;s migratability.
Definition: thread.c:1151
int ABT_self_suspend(void) ABT_API_PUBLIC
Suspend the current ULT.
Definition: self.c:231
int ABT_pool_remove(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Remove a specified unit from the target pool.
Definition: pool.c:294
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:140
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:92
int ABT_pool_push(ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC
Push a unit to the target pool.
Definition: pool.c:258
int ABT_barrier_wait(ABT_barrier barrier) ABT_API_PUBLIC
Wait on the barrier.
Definition: barrier.c:144
struct ABT_future_opaque * ABT_future
Definition: abt.h:303
int ABT_thread_join(ABT_thread thread) ABT_API_PUBLIC
Wait for thread to terminate.
Definition: thread.c:371
int ABT_mutex_lock(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex.
Definition: mutex.c:141
int ABT_xstream_free(ABT_xstream *xstream) ABT_API_PUBLIC
Release the ES object associated with ES handle.
Definition: stream.c:388
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:1007
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:479
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:241
int ABT_thread_attr_free(ABT_thread_attr *attr) ABT_API_PUBLIC
Free the ULT attribute object.
Definition: thread_attr.c:55
void(* ABT_unit_free_fn)(ABT_unit *)
Definition: abt.h:403
int ABT_task_get_arg(ABT_task task, void **arg) ABT_API_PUBLIC
Retrieve the argument for the tasklet function.
Definition: task.c:663
ABT_sched_type type
Definition: abt.h:387
struct ABT_eventual_opaque * ABT_eventual
Definition: abt.h:301
int ABT_pool_add_sched(ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC
Push a scheduler to a pool.
Definition: pool.c:433
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:394
int ABT_sched_config_free(ABT_sched_config *config) ABT_API_PUBLIC
Free the configuration.
Definition: config.c:197
int ABT_key_create(void(*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC
Create an WU-specific data key.
Definition: key.c:46
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:694
int ABT_thread_get_id(ABT_thread thread, ABT_thread_id *thread_id) ABT_API_PUBLIC
Get the ULT&#39;s id.
Definition: thread.c:1304
ABT_pool_kind
Definition: abt.h:157
ABT_unit_create_from_task_fn u_create_from_task
Definition: abt.h:423
int ABT_self_get_arg(void **arg) ABT_API_PUBLIC
Retrieve the argument for the work unit function.
Definition: self.c:324
ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)
Definition: abt.h:398
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:240
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:666
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:119
int ABT_pool_create_basic(ABT_pool_kind kind, ABT_pool_access access, ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC
Create a new pool from a predefined type and return its handle through newpool.
Definition: pool.c:63
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:404
int ABT_eventual_wait(ABT_eventual eventual, void **value) ABT_API_PUBLIC
Wait on the eventual.
Definition: eventual.c:104
void(* ABT_sched_run_fn)(ABT_sched)
Definition: abt.h:381
int ABT_thread_set_arg(ABT_thread thread, void *arg) ABT_API_PUBLIC
Set the argument for the ULT function.
Definition: thread.c:1332
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:190
ABT_sched_type
Definition: abt.h:152
int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)
Definition: abt.h:409
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:93
#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:58
int ABT_timer_start(ABT_timer timer) ABT_API_PUBLIC
Start the timer.
Definition: timer.c:146
int ABT_task_get_state(ABT_task task, ABT_task_state *state) ABT_API_PUBLIC
Return the state of task.
Definition: task.c:450
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:177
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:30
int ABT_thread_get_arg(ABT_thread thread, void **arg) ABT_API_PUBLIC
Retrieve the argument for the ULT function.
Definition: thread.c:1362
int ABT_xstream_get_state(ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC
Return the state of xstream.
Definition: stream.c:883
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:422
struct ABT_sched_config_opaque * ABT_sched_config
Definition: abt.h:259
int ABT_task_get_last_pool_id(ABT_task task, int *id) ABT_API_PUBLIC
Get the last pool&#39;s ID of the tasklet.
Definition: task.c:512
int ABT_self_is_primary(ABT_bool *flag) ABT_API_PUBLIC
Check if the caller is the primary ULT.
Definition: self.c:72
int ABT_cond_broadcast(ABT_cond cond) ABT_API_PUBLIC
Broadcast a condition.
Definition: cond.c:336
int ABT_task_self_id(uint64_t *id) ABT_API_PUBLIC
Return the ID of the calling tasklet.
Definition: task.c:382
int ABT_mutex_unlock(ABT_mutex mutex) ABT_API_PUBLIC
Unlock the mutex.
Definition: mutex.c:433
int ABT_xstream_revive(ABT_xstream xstream) ABT_API_PUBLIC
Restart an ES that has been joined by ABT_xstream_join().
Definition: stream.c:305
ABT_sched_get_migr_pool_fn get_migr_pool
Definition: abt.h:393
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:714
int ABT_mutex_trylock(ABT_mutex mutex) ABT_API_PUBLIC
Attempt to lock a mutex without blocking.
Definition: mutex.c:334
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:124
int ABT_mutex_spinlock(ABT_mutex mutex) ABT_API_PUBLIC
Lock the mutex without context switch.
Definition: mutex.c:386
int ABT_task_free(ABT_task *task) ABT_API_PUBLIC
Release the task object associated with task handle.
Definition: task.c:220
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:725
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:59
int ABT_xstream_set_rank(ABT_xstream xstream, const int rank) ABT_API_PUBLIC
Set the rank for target ES.
Definition: stream.c:640
int ABT_eventual_test(ABT_eventual eventual, void **value, int *is_ready) ABT_API_PUBLIC
Test the readiness of an eventual.
Definition: eventual.c:193
struct ABT_pool_config_opaque * ABT_pool_config
Definition: abt.h:269
ABT_thread_state
Definition: abt.h:124
ABT_unit_get_type_fn u_get_type
Definition: abt.h:418
ABT_pool_get_size_fn p_get_size
Definition: abt.h:428
int(* ABT_pool_free_fn)(ABT_pool)
Definition: abt.h:410
int(* ABT_pool_print_all_fn)(ABT_pool, void *arg, void(*)(void *, ABT_unit))
Definition: abt.h:411
ABT_info_query_kind
Definition: abt.h:177
ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)
Definition: abt.h:401
ABT_sched_config_var ABT_sched_config_var_end
Definition: config.c:17
int ABT_future_reset(ABT_future future) ABT_API_PUBLIC
Reset the readiness of the target future.
Definition: futures.c:334
ABT_sched_run_fn run
Definition: abt.h:391
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:259
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:148
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:1256
int ABT_rwlock_rdlock(ABT_rwlock rwlock) ABT_API_PUBLIC
Lock the rwlock as a reader.
Definition: rwlock.c:98
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:377
ABT_pool_remove_fn p_remove
Definition: abt.h:432
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:285
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:1001
ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)
Definition: abt.h:408
int ABT_thread_self(ABT_thread *thread) ABT_API_PUBLIC
Return the handle of the calling ULT.
Definition: thread.c:514
int ABT_task_is_migratable(ABT_task task, ABT_bool *flag) ABT_API_PUBLIC
Get the tasklet&#39;s migratability.
Definition: task.c:580
ABT_pool_print_all_fn p_print_all
Definition: abt.h:434
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:916
ABT_pool_pop_timedwait_fn p_pop_timedwait
Definition: abt.h:431
int ABT_task_get_xstream(ABT_task task, ABT_xstream *xstream) ABT_API_PUBLIC
Get the ES associated with the target tasklet.
Definition: task.c:424
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:951
int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC
Signal the eventual.
Definition: eventual.c:235
int ABT_task_revive(ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *task) ABT_API_PUBLIC
Revive the tasklet.
Definition: task.c:184
int ABT_key_set(ABT_key key, void *value) ABT_API_PUBLIC
Associate a value with the key.
Definition: key.c:114
int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)
Definition: abt.h:404
int ABT_cond_signal(ABT_cond cond) ABT_API_PUBLIC
Signal a condition.
Definition: cond.c:273
int ABT_initialized(void) ABT_API_PUBLIC
Check whether ABT_init() has been called.
Definition: global.c:239
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:122
struct ABT_cond_opaque * ABT_cond
Definition: abt.h:297
struct ABT_timer_opaque * ABT_timer
Definition: abt.h:307