41 ABTI_local *p_local = ABTI_local_get_local();
42 *type = ABTI_self_get_type(p_local);
43 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD 75 ABTI_local *p_local = ABTI_local_get_local();
76 ABTI_thread *p_thread;
85 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD 87 if (p_local == NULL) {
94 p_thread = p_local->p_thread;
125 ABTI_local *p_local = ABTI_local_get_local();
126 ABTI_xstream *p_xstream;
135 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD 137 if (p_local == NULL) {
144 p_xstream = p_local->p_xstream;
145 ABTI_CHECK_NULL_XSTREAM_PTR(p_xstream);
180 ABTI_local *p_local = ABTI_local_get_local();
181 ABTI_thread *p_thread;
191 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD 193 if (p_local == NULL) {
200 if ((p_thread = p_local->p_thread)) {
201 ABTI_ASSERT(p_thread->p_pool);
202 *pool_id = (int)(p_thread->p_pool->id);
203 }
else if ((p_task = p_local->p_task)) {
204 ABTI_ASSERT(p_task->p_pool);
205 *pool_id = (int)(p_task->p_pool->id);
234 ABTI_local *p_local = ABTI_local_get_local();
235 #ifdef ABT_CONFIG_DISABLE_EXT_THREAD 236 ABTI_thread *p_thread = p_local->p_thread;
238 ABTI_thread *p_thread = NULL;
241 if (p_local != NULL) {
242 p_thread = p_local->p_thread;
245 if (p_thread == NULL) {
250 abt_errno = ABTI_thread_set_blocked(p_thread);
251 ABTI_CHECK_ERROR(abt_errno);
253 ABTI_thread_suspend(&p_local, p_thread);
277 ABTI_local *p_local = ABTI_local_get_local();
278 ABTI_thread *p_thread;
288 if (p_local == NULL) {
293 if ((p_thread = p_local->p_thread)) {
294 ABTD_thread_context_set_arg(&p_thread->ctx, arg);
295 }
else if ((p_task = p_local->p_task)) {
327 ABTI_local *p_local = ABTI_local_get_local();
328 ABTI_thread *p_thread;
338 #ifndef ABT_CONFIG_DISABLE_EXT_THREAD 340 if (p_local == NULL) {
347 if ((p_thread = p_local->p_thread)) {
348 *arg = ABTD_thread_context_get_arg(&p_thread->ctx);
349 }
else if ((p_task = p_local->p_task)) {
350 *arg = p_task->p_arg;
int ABT_self_set_arg(void *arg)
Set the argument for the work unit function.
#define ABT_ERR_INV_THREAD
int ABT_self_get_type(ABT_unit_type *type)
Return the type of calling work unit.
#define HANDLE_ERROR_FUNC_WITH_CODE(n)
ABTI_global * gp_ABTI_global
int ABT_self_suspend(void)
Suspend the current ULT.
#define ABT_ERR_UNINITIALIZED
int ABT_self_get_arg(void **arg)
Retrieve the argument for the work unit function.
int ABT_self_get_last_pool_id(int *pool_id)
Get the last pool's ID of calling work unit.
int ABT_self_is_primary(ABT_bool *flag)
Check if the caller is the primary ULT.
#define ABT_ERR_INV_XSTREAM
int ABT_self_on_primary_xstream(ABT_bool *flag)
Check if the caller's ES is the primary ES.