ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
6 #ifndef ABTI_EVENT_H_INCLUDED
7 #define ABTI_EVENT_H_INCLUDED
9 #if !defined(ABT_CONFIG_DISABLE_TOOL_INTERFACE) || \
10 defined(ABT_CONFIG_USE_DEBUG_LOG)
11 #define ABTI_ENABLE_EVENT_INTERFACE 1
13 #define ABTI_ENABLE_EVENT_INTERFACE 0
21 #ifdef ABT_CONFIG_USE_DEBUG_LOG
22 ABTI_log_debug_thread(
"create", p_thread);
24 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
35 #ifdef ABT_CONFIG_USE_DEBUG_LOG
36 ABTI_log_debug_thread(
"join", p_thread);
38 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
49 #ifdef ABT_CONFIG_USE_DEBUG_LOG
50 ABTI_log_debug_thread(
"free", p_thread);
52 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
64 #ifdef ABT_CONFIG_USE_DEBUG_LOG
65 ABTI_log_debug_thread(
"revive", p_thread);
67 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
79 #ifdef ABT_CONFIG_USE_DEBUG_LOG
80 ABTI_log_debug_thread(
"run", p_thread);
82 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
93 #ifdef ABT_CONFIG_USE_DEBUG_LOG
94 ABTI_log_debug_thread(
"finish", p_thread);
96 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
106 #ifdef ABT_CONFIG_USE_DEBUG_LOG
107 ABTI_log_debug_thread(
"cancel", p_thread);
109 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
121 #ifdef ABT_CONFIG_USE_DEBUG_LOG
122 ABTI_log_debug_thread(
"yield", &p_ythread->
thread);
124 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
128 sync_event_type, p_sync);
136 #ifdef ABT_CONFIG_USE_DEBUG_LOG
137 ABTI_log_debug_thread(
"suspend", &p_ythread->
thread);
139 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
143 sync_event_type, p_sync);
151 #ifdef ABT_CONFIG_USE_DEBUG_LOG
152 ABTI_log_debug_thread(
"resume", &p_ythread->
thread);
154 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
156 &p_ythread->
thread, p_caller,
162 #define ABTI_event_thread_create(p_local, p_thread, p_caller, p_pool) \
164 if (ABTI_ENABLE_EVENT_INTERFACE) { \
165 ABTI_event_thread_create_impl(p_local, p_thread, p_caller, \
170 #define ABTI_event_thread_join(p_local, p_thread, p_caller) \
172 if (ABTI_ENABLE_EVENT_INTERFACE) { \
173 ABTI_event_thread_join_impl(p_local, p_thread, p_caller); \
177 #define ABTI_event_thread_free(p_local, p_thread, p_caller) \
179 if (ABTI_ENABLE_EVENT_INTERFACE) { \
180 ABTI_event_thread_free_impl(p_local, p_thread, p_caller); \
184 #define ABTI_event_thread_revive(p_local, p_thread, p_caller, p_pool) \
186 if (ABTI_ENABLE_EVENT_INTERFACE) { \
187 ABTI_event_thread_revive_impl(p_local, p_thread, p_caller, \
192 #define ABTI_event_thread_run(p_local_xstream, p_thread, p_prev, p_parent) \
194 if (ABTI_ENABLE_EVENT_INTERFACE) { \
195 ABTI_event_thread_run_impl(p_local_xstream, p_thread, p_prev, \
200 #define ABTI_event_thread_finish(p_local_xstream, p_thread, p_parent) \
202 if (ABTI_ENABLE_EVENT_INTERFACE) { \
203 ABTI_event_thread_finish_impl(p_local_xstream, p_thread, \
208 #define ABTI_event_thread_cancel(p_local_xstream, p_thread) \
210 if (ABTI_ENABLE_EVENT_INTERFACE) { \
211 ABTI_event_thread_cancel_impl(p_local_xstream, p_thread); \
215 #define ABTI_event_ythread_yield(p_local_xstream, p_ythread, p_parent, \
216 sync_event_type, p_sync) \
218 if (ABTI_ENABLE_EVENT_INTERFACE) { \
219 ABTI_event_ythread_yield_impl(p_local_xstream, p_ythread, \
220 p_parent, sync_event_type, p_sync); \
224 #define ABTI_event_ythread_suspend(p_local_xstream, p_ythread, p_parent, \
225 sync_event_type, p_sync) \
227 if (ABTI_ENABLE_EVENT_INTERFACE) { \
228 ABTI_event_ythread_suspend_impl(p_local_xstream, p_ythread, \
229 p_parent, sync_event_type, \
234 #define ABTI_event_ythread_resume(p_local, p_ythread, p_caller) \
236 if (ABTI_ENABLE_EVENT_INTERFACE) { \
237 ABTI_event_ythread_resume_impl(p_local, p_ythread, p_caller); \
static void ABTI_event_thread_free_impl(ABTI_local *p_local, ABTI_thread *p_thread, ABTI_thread *p_caller)
static void ABTI_event_thread_join_impl(ABTI_local *p_local, ABTI_thread *p_thread, ABTI_thread *p_caller)
static void ABTI_event_ythread_suspend_impl(ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread, ABTI_thread *p_parent, ABT_sync_event_type sync_event_type, void *p_sync)
static void ABTI_event_thread_run_impl(ABTI_xstream *p_local_xstream, ABTI_thread *p_thread, ABTI_thread *p_prev, ABTI_thread *p_parent)
static void ABTI_event_thread_revive_impl(ABTI_local *p_local, ABTI_thread *p_thread, ABTI_thread *p_caller, ABTI_pool *p_pool)
static void ABTI_event_ythread_yield_impl(ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread, ABTI_thread *p_parent, ABT_sync_event_type sync_event_type, void *p_sync)
static void ABTI_event_thread_create_impl(ABTI_local *p_local, ABTI_thread *p_thread, ABTI_thread *p_caller, ABTI_pool *p_pool)
static void ABTI_event_thread_finish_impl(ABTI_xstream *p_local_xstream, ABTI_thread *p_thread, ABTI_thread *p_parent)
static ABTI_local * ABTI_xstream_get_local(ABTI_xstream *p_xstream)
struct ABTI_local ABTI_local
static void ABTI_event_ythread_resume_impl(ABTI_local *p_local, ABTI_ythread *p_ythread, ABTI_thread *p_caller)
static void ABTI_event_thread_cancel_impl(ABTI_xstream *p_local_xstream, ABTI_thread *p_thread)