ARGOBOTS
1.1
|
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <limits.h>
#include "abt_config.h"
#include "abt.h"
#include "abtu.h"
#include "abti_error.h"
#include "abti_valgrind.h"
#include "abtd.h"
#include "abti_sync_lifo.h"
#include "abti_mem_pool.h"
#include "abti_timer.h"
#include "abti_log.h"
#include "abti_local.h"
#include "abti_global.h"
#include "abti_self.h"
#include "abti_pool.h"
#include "abti_sched.h"
#include "abti_config.h"
#include "abti_stream.h"
#include "abti_thread.h"
#include "abti_unit.h"
#include "abti_tool.h"
#include "abti_ythread.h"
#include "abti_thread_attr.h"
#include "abti_waitlist.h"
#include "abti_mutex.h"
#include "abti_mutex_attr.h"
#include "abti_cond.h"
#include "abti_rwlock.h"
#include "abti_eventual.h"
#include "abti_future.h"
#include "abti_barrier.h"
#include "abti_stream_barrier.h"
#include "abti_mem.h"
#include "abti_key.h"
Go to the source code of this file.
Data Structures | |
struct | ABTI_waitlist |
struct | ABTI_mutex_attr |
struct | ABTI_mutex |
struct | ABTI_atomic_unit_to_thread |
struct | ABTI_unit_to_thread_entry |
struct | ABTI_global |
struct | ABTI_local_func |
struct | ABTI_xstream |
struct | ABTI_sched |
struct | ABTI_sched_config_element |
struct | ABTI_sched_config |
struct | ABTI_pool |
struct | ABTI_pool_def |
struct | ABTI_thread |
struct | ABTI_thread_attr |
struct | ABTI_thread_mig_data |
struct | ABTI_ythread |
struct | ABTI_key |
struct | ABTI_ktelem |
struct | ABTI_ktable |
struct | ABTI_cond |
struct | ABTI_rwlock |
struct | ABTI_eventual |
struct | ABTI_future |
struct | ABTI_barrier |
struct | ABTI_xstream_barrier |
struct | ABTI_timer |
struct | ABTI_tool_context |
Enumerations | |
enum | ABTI_xstream_type { ABTI_XSTREAM_TYPE_PRIMARY, ABTI_XSTREAM_TYPE_SECONDARY } |
enum | ABTI_sched_used { ABTI_SCHED_NOT_USED, ABTI_SCHED_MAIN, ABTI_SCHED_IN_POOL } |
Variables | |
ABTI_global * | gp_ABTI_global |
ABTI_local_func | gp_ABTI_local_func |
ABTD_XSTREAM_LOCAL ABTI_local * | lp_ABTI_local |
#define ABTI_THREAD_REQ_NON_YIELD |
#define ABTI_THREAD_TYPE_EXT ((ABTI_thread_type)0) |
#define ABTI_THREAD_TYPE_MAIN_SCHED ((ABTI_thread_type)(0x1 << 3)) |
#define ABTI_THREAD_TYPE_MEM_MALLOC_DESC ((ABTI_thread_type)(0x1 << 8)) |
#define ABTI_THREAD_TYPE_MEM_MALLOC_DESC_STACK ((ABTI_thread_type)(0x1 << 10)) |
#define ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC ((ABTI_thread_type)(0x1 << 7)) |
#define ABTI_THREAD_TYPE_MEM_MEMPOOL_DESC_STACK ((ABTI_thread_type)(0x1 << 9)) |
#define ABTI_THREAD_TYPE_MIGRATABLE ((ABTI_thread_type)(0x1 << 6)) |
#define ABTI_THREAD_TYPE_NAMED ((ABTI_thread_type)(0x1 << 5)) |
#define ABTI_THREAD_TYPE_PRIMARY ((ABTI_thread_type)(0x1 << 2)) |
#define ABTI_THREAD_TYPE_ROOT ((ABTI_thread_type)(0x1 << 1)) |
#define ABTI_THREAD_TYPE_THREAD ((ABTI_thread_type)(0x1 << 0)) |
#define ABTI_THREAD_TYPE_YIELDABLE ((ABTI_thread_type)(0x1 << 4)) |
#define ABTI_THREAD_TYPES_MEM |
#define ABTI_UNIT_HASH_TABLE_SIZE ((size_t)(1 << ABTI_UNIT_HASH_TABLE_SIZE_EXP)) |
#define ABTI_UNIT_HASH_TABLE_SIZE_EXP 8 /* N -> 2^N table entries */ |
typedef struct ABTI_atomic_unit_to_thread ABTI_atomic_unit_to_thread |
typedef struct ABTI_barrier ABTI_barrier |
typedef struct ABTI_eventual ABTI_eventual |
typedef struct ABTI_future ABTI_future |
typedef struct ABTI_global ABTI_global |
typedef struct ABTI_ktable ABTI_ktable |
typedef struct ABTI_ktelem ABTI_ktelem |
typedef struct ABTI_local ABTI_local |
typedef struct ABTI_local_func ABTI_local_func |
typedef struct ABTI_mutex ABTI_mutex |
typedef struct ABTI_mutex_attr ABTI_mutex_attr |
typedef struct ABTI_native_thread_id_opaque* ABTI_native_thread_id |
typedef struct ABTI_pool_def ABTI_pool_def |
typedef struct ABTI_rwlock ABTI_rwlock |
typedef struct ABTI_sched ABTI_sched |
typedef struct ABTI_sched_config ABTI_sched_config |
typedef struct ABTI_sched_config_element ABTI_sched_config_element |
typedef void* ABTI_sched_id |
typedef uintptr_t ABTI_sched_kind |
typedef enum ABTI_sched_used ABTI_sched_used |
typedef struct ABTI_thread ABTI_thread |
typedef struct ABTI_thread_attr ABTI_thread_attr |
typedef struct ABTI_thread_id_opaque* ABTI_thread_id |
typedef struct ABTI_thread_mig_data ABTI_thread_mig_data |
typedef uint32_t ABTI_thread_type |
typedef struct ABTI_timer ABTI_timer |
typedef struct ABTI_tool_context ABTI_tool_context |
typedef struct ABTI_unit_to_thread_entry ABTI_unit_to_thread_entry |
typedef struct ABTI_waitlist ABTI_waitlist |
typedef struct ABTI_xstream ABTI_xstream |
typedef struct ABTI_xstream_barrier ABTI_xstream_barrier |
typedef enum ABTI_xstream_type ABTI_xstream_type |
typedef struct ABTI_ythread ABTI_ythread |
enum ABTI_sched_used |
enum ABTI_xstream_type |
void ABTI_info_print_config | ( | ABTI_global * | p_global, |
FILE * | fp | ||
) |
Definition at line 1010 of file info.c.
Referenced by ABT_info_print_config(), and init_library().
void ABTI_ktable_free | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_ktable * | p_ktable | ||
) |
Definition at line 232 of file key.c.
Referenced by thread_free(), and ythread_create().
ABTU_ret_err int ABTI_pool_create_basic | ( | ABT_pool_kind | kind, |
ABT_pool_access | access, | ||
ABT_bool | automatic, | ||
ABTI_pool ** | pp_newpool | ||
) |
Definition at line 858 of file pool.c.
Referenced by ABT_pool_create_basic(), ABTI_sched_create_basic(), sched_create(), and xstream_create().
void ABTI_pool_free | ( | ABTI_pool * | p_pool | ) |
Definition at line 891 of file pool.c.
Referenced by ABT_pool_free(), ABTI_sched_create_basic(), ABTI_sched_free(), sched_create(), and xstream_create().
ABTU_ret_err int ABTI_pool_get_fifo_def | ( | ABT_pool_access | access, |
ABTI_pool_def * | p_def | ||
) |
Definition at line 68 of file fifo.c.
Referenced by ABTI_pool_create_basic().
ABTU_ret_err int ABTI_pool_get_fifo_wait_def | ( | ABT_pool_access | access, |
ABTI_pool_def * | p_def | ||
) |
Definition at line 39 of file fifo_wait.c.
Referenced by ABTI_pool_create_basic().
void ABTI_pool_print | ( | ABTI_pool * | p_pool, |
FILE * | p_os, | ||
int | indent | ||
) |
Definition at line 901 of file pool.c.
Referenced by ABT_info_print_pool(), and ABTI_sched_print().
void ABTI_pool_reset_id | ( | void | ) |
Definition at line 950 of file pool.c.
Referenced by init_library().
ABTU_ret_err int ABTI_sched_config_read | ( | const ABTI_sched_config * | p_config, |
int | idx, | ||
void * | p_val | ||
) |
Definition at line 259 of file config.c.
Referenced by ABT_sched_config_read(), sched_create(), and sched_init().
ABTU_ret_err int ABTI_sched_create_basic | ( | ABT_sched_predef | predef, |
int | num_pools, | ||
ABT_pool * | pools, | ||
ABTI_sched_config * | p_config, | ||
ABTI_sched ** | pp_newsched | ||
) |
Definition at line 655 of file sched.c.
Referenced by ABT_sched_create_basic(), ABT_xstream_create(), ABT_xstream_create_basic(), ABT_xstream_create_with_rank(), and ABT_xstream_set_main_sched_basic().
void ABTI_sched_exit | ( | ABTI_sched * | p_sched | ) |
Definition at line 650 of file sched.c.
Referenced by ABT_sched_exit().
void ABTI_sched_finish | ( | ABTI_sched * | p_sched | ) |
Definition at line 645 of file sched.c.
Referenced by ABT_sched_finish(), and finailze_library().
void ABTI_sched_free | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_sched * | p_sched, | ||
ABT_bool | force_free | ||
) |
Definition at line 834 of file sched.c.
Referenced by ABT_sched_free(), ABT_xstream_create(), ABT_xstream_create_basic(), ABT_xstream_create_with_rank(), ABT_xstream_set_main_sched_basic(), ABTI_sched_discard_and_free(), and thread_key_destructor_stackable_sched().
ABT_sched_def* ABTI_sched_get_basic_def | ( | void | ) |
Definition at line 30 of file basic.c.
Referenced by ABTI_sched_create_basic(), and ABTI_sched_print().
ABT_sched_def* ABTI_sched_get_basic_wait_def | ( | void | ) |
Definition at line 27 of file basic_wait.c.
Referenced by ABTI_sched_create_basic(), and ABTI_sched_print().
size_t ABTI_sched_get_effective_size | ( | ABTI_local * | p_local, |
ABTI_sched * | p_sched | ||
) |
Definition at line 929 of file sched.c.
Referenced by ABTI_sched_has_to_stop().
ABTU_ret_err int ABTI_sched_get_migration_pool | ( | ABTI_sched * | , |
ABTI_pool * | , | ||
ABTI_pool ** | |||
) |
ABT_sched_def* ABTI_sched_get_prio_def | ( | void | ) |
Definition at line 29 of file prio.c.
Referenced by ABTI_sched_create_basic(), and ABTI_sched_print().
ABT_sched_def* ABTI_sched_get_randws_def | ( | void | ) |
Definition at line 31 of file randws.c.
Referenced by ABTI_sched_create_basic(), and ABTI_sched_print().
size_t ABTI_sched_get_size | ( | ABTI_sched * | p_sched | ) |
Definition at line 633 of file sched.c.
Referenced by ABT_sched_get_size(), and ABTI_sched_print().
size_t ABTI_sched_get_total_size | ( | ABTI_sched * | p_sched | ) |
Definition at line 912 of file sched.c.
Referenced by ABT_sched_get_total_size(), and ABTI_sched_print().
ABT_bool ABTI_sched_has_to_stop | ( | ABTI_local ** | pp_local, |
ABTI_sched * | p_sched | ||
) |
Definition at line 871 of file sched.c.
Referenced by ABT_sched_has_to_stop(), and sched_run().
void ABTI_sched_print | ( | ABTI_sched * | p_sched, |
FILE * | p_os, | ||
int | indent, | ||
ABT_bool | print_sub | ||
) |
Definition at line 959 of file sched.c.
Referenced by ABT_info_print_sched().
void ABTI_sched_reset_id | ( | void | ) |
Definition at line 1033 of file sched.c.
Referenced by init_library().
ABTU_ret_err int ABTI_thread_attr_dup | ( | const ABTI_thread_attr * | p_attr, |
ABTI_thread_attr ** | pp_dup_attr | ||
) |
Definition at line 413 of file thread_attr.c.
void ABTI_thread_attr_print | ( | ABTI_thread_attr * | p_attr, |
FILE * | p_os, | ||
int | indent | ||
) |
Definition at line 369 of file thread_attr.c.
Referenced by ABT_info_print_thread_attr().
void ABTI_thread_free | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_thread * | p_thread | ||
) |
Definition at line 2400 of file thread.c.
Referenced by ABTI_sched_discard_and_free(), ABTI_sched_free(), ABTI_xstream_terminate_thread(), and xstream_create().
ABT_unit_id ABTI_thread_get_id | ( | ABTI_thread * | p_thread | ) |
Definition at line 2561 of file thread.c.
Referenced by ABT_self_get_thread_id(), ABTI_thread_free(), ABTI_thread_revive(), ABTI_xstream_terminate_thread(), ABTI_ythread_context_switch_to_child_internal(), ABTI_ythread_dynamic_promote_ythread(), ABTI_ythread_free_primary(), ABTI_ythread_set_blocked(), ABTI_ythread_set_ready(), ABTI_ythread_suspend(), ABTI_ythread_yield(), task_create(), xstream_schedule_ythread(), ythread_create(), and ythread_terminate().
ABTU_ret_err int ABTI_thread_get_mig_data | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_thread * | p_thread, | ||
ABTI_thread_mig_data ** | pp_mig_data | ||
) |
Definition at line 2436 of file thread.c.
Referenced by ABT_thread_set_callback(), and thread_migrate_to_pool().
void ABTI_thread_join | ( | ABTI_local ** | pp_local, |
ABTI_thread * | p_thread | ||
) |
void ABTI_thread_print | ( | ABTI_thread * | p_thread, |
FILE * | p_os, | ||
int | indent | ||
) |
Definition at line 2461 of file thread.c.
Referenced by ABT_info_print_thread().
void ABTI_thread_reset_id | ( | void | ) |
Definition at line 2556 of file thread.c.
Referenced by init_library().
ABTU_ret_err int ABTI_thread_revive | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_pool * | p_pool, | ||
void(*)(void *) | thread_func, | ||
void * | arg, | ||
ABTI_thread * | p_thread | ||
) |
Definition at line 2257 of file thread.c.
Referenced by ABT_thread_revive(), and ABT_xstream_revive().
void ABTI_unit_finalize_hash_table | ( | ABTI_global * | p_global | ) |
Definition at line 96 of file unit.c.
Referenced by finailze_library().
ABTI_thread* ABTI_unit_get_thread_from_user_defined_unit | ( | ABTI_global * | p_global, |
ABT_unit | unit | ||
) |
Definition at line 112 of file unit.c.
Referenced by ABTI_unit_get_thread(), and ABTI_unit_set_associated_pool().
void ABTI_unit_init_hash_table | ( | ABTI_global * | p_global | ) |
Definition at line 91 of file unit.c.
Referenced by init_library().
ABTU_ret_err int ABTI_unit_map_thread | ( | ABTI_global * | p_global, |
ABT_unit | unit, | ||
ABTI_thread * | p_thread | ||
) |
Definition at line 101 of file unit.c.
Referenced by ABTI_thread_init_pool(), ABTI_thread_set_associated_pool(), and ABTI_unit_set_associated_pool().
void ABTI_unit_unmap_thread | ( | ABTI_global * | p_global, |
ABT_unit | unit | ||
) |
Definition at line 107 of file unit.c.
Referenced by ABTI_thread_set_associated_pool(), ABTI_thread_unset_associated_pool(), and ABTI_unit_set_associated_pool().
void ABTI_xstream_check_events | ( | ABTI_xstream * | p_xstream, |
ABTI_sched * | p_sched | ||
) |
Definition at line 1568 of file stream.c.
Referenced by sched_run().
ABTU_ret_err int ABTI_xstream_create_primary | ( | ABTI_global * | p_global, |
ABTI_xstream ** | pp_xstream | ||
) |
Definition at line 1500 of file stream.c.
Referenced by init_library().
void ABTI_xstream_free | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_xstream * | p_xstream, | ||
ABT_bool | force_free | ||
) |
Definition at line 1584 of file stream.c.
Referenced by ABT_xstream_free(), finailze_library(), and init_library().
void ABTI_xstream_print | ( | ABTI_xstream * | p_xstream, |
FILE * | p_os, | ||
int | indent, | ||
ABT_bool | print_sub | ||
) |
Definition at line 1620 of file stream.c.
Referenced by ABT_info_print_all_xstreams(), and ABT_info_print_xstream().
void ABTI_xstream_run_thread | ( | ABTI_global * | p_global, |
ABTI_xstream ** | pp_local_xstream, | ||
ABTI_thread * | p_thread | ||
) |
Definition at line 1554 of file stream.c.
Referenced by sched_run().
void ABTI_xstream_schedule | ( | void * | p_arg | ) |
void ABTI_xstream_start_primary | ( | ABTI_global * | p_global, |
ABTI_xstream ** | pp_local_xstream, | ||
ABTI_xstream * | p_xstream, | ||
ABTI_ythread * | p_ythread | ||
) |
Definition at line 1525 of file stream.c.
Referenced by init_library().
ABTU_ret_err int ABTI_ythread_create_main_sched | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_xstream * | p_xstream, | ||
ABTI_sched * | p_sched | ||
) |
Definition at line 2355 of file thread.c.
Referenced by xstream_create().
ABTU_ret_err int ABTI_ythread_create_primary | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_xstream * | p_xstream, | ||
ABTI_ythread ** | p_ythread | ||
) |
Definition at line 2300 of file thread.c.
Referenced by init_library().
ABTU_ret_err int ABTI_ythread_create_root | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_xstream * | p_xstream, | ||
ABTI_ythread ** | pp_root_ythread | ||
) |
Definition at line 2328 of file thread.c.
Referenced by xstream_create().
ABTU_ret_err int ABTI_ythread_create_sched | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_pool * | p_pool, | ||
ABTI_sched * | p_sched | ||
) |
Definition at line 2376 of file thread.c.
Referenced by ABT_pool_add_sched().
ABTU_noreturn void ABTI_ythread_exit | ( | ABTI_xstream * | p_local_xstream, |
ABTI_ythread * | p_ythread | ||
) |
Definition at line 2425 of file thread.c.
Referenced by ABT_self_exit(), and ABT_xstream_exit().
void ABTI_ythread_free_primary | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_ythread * | p_ythread | ||
) |
Definition at line 2410 of file thread.c.
Referenced by finailze_library().
void ABTI_ythread_free_root | ( | ABTI_global * | p_global, |
ABTI_local * | p_local, | ||
ABTI_ythread * | p_ythread | ||
) |
Definition at line 2419 of file thread.c.
Referenced by xstream_create().
void ABTI_ythread_print_stack | ( | ABTI_ythread * | p_ythread, |
FILE * | p_os | ||
) |
void ABTI_ythread_set_blocked | ( | ABTI_ythread * | p_ythread | ) |
Definition at line 23 of file ythread.c.
Referenced by ABT_self_suspend(), and ABTI_waitlist_wait_and_unlock().
void ABTI_ythread_set_ready | ( | ABTI_local * | p_local, |
ABTI_ythread * | p_ythread | ||
) |
Definition at line 65 of file ythread.c.
Referenced by ABTD_ythread_cancel(), ABTI_waitlist_broadcast(), ABTI_waitlist_signal(), ABTI_ythread_context_switch_to_child_internal(), and ythread_terminate().
void ABTI_ythread_suspend | ( | ABTI_xstream ** | pp_local_xstream, |
ABTI_ythread * | p_ythread, | ||
ABT_sync_event_type | sync_event_type, | ||
void * | p_sync | ||
) |
Definition at line 45 of file ythread.c.
Referenced by ABT_self_suspend(), and ABTI_waitlist_wait_and_unlock().
ABTI_global* gp_ABTI_global |
Definition at line 18 of file global.c.
Referenced by ABTI_global_get_global(), ABTI_global_get_global_or_null(), ABTI_global_set_global(), and ABTI_tool_event_thread_impl().
ABTI_local_func gp_ABTI_local_func |
Definition at line 23 of file local.c.
Referenced by ABTI_local_get_local_ptr(), ABTI_local_get_local_uninlined(), and ABTI_local_set_xstream().
ABTD_XSTREAM_LOCAL ABTI_local* lp_ABTI_local |
Definition at line 29 of file local.c.
Referenced by ABTI_local_get_local(), local_get_local_internal(), local_get_local_ptr_internal(), and local_set_xstream_internal().