ARGOBOTS  1.1
Functions
Self

This group is for the self wok unit. More...

Functions

int ABT_self_get_xstream (ABT_xstream *xstream)
 Get an execution stream that is running the calling work unit. More...
 
int ABT_self_get_xstream_rank (int *rank)
 Return a rank of an execution stream that is running the calling work unit. More...
 
int ABT_self_get_thread (ABT_thread *thread)
 Get the calling work unit. More...
 
int ABT_self_get_thread_id (ABT_unit_id *id)
 Get ID of the calling work unit. More...
 
int ABT_self_get_task (ABT_thread *thread)
 Get the calling work unit. More...
 
int ABT_self_get_task_id (ABT_unit_id *id)
 Get ID of the calling work unit. More...
 
int ABT_self_set_specific (ABT_key key, void *value)
 Associate a value with a work-unit-specific data key in the calling work unit. More...
 
int ABT_self_get_specific (ABT_key key, void **value)
 Get a value associated with a work-unit-specific data key in the calling work unit. More...
 
int ABT_self_get_type (ABT_unit_type *type)
 Obtain a type of the caller. More...
 
int ABT_self_is_primary (ABT_bool *is_primary)
 Check if the caller is the primary ULT. More...
 
int ABT_self_on_primary_xstream (ABT_bool *on_primary)
 Check if the caller is running on the primary execution stream. More...
 
int ABT_self_get_last_pool (ABT_pool *pool)
 Get the last pool of the calling work unit. More...
 
int ABT_self_get_last_pool_id (int *pool_id)
 Get ID of the last pool of the calling work unit. More...
 
int ABT_self_set_associated_pool (ABT_pool pool)
 Set an associated pool for the calling work unit. More...
 
int ABT_self_get_unit (ABT_unit *unit)
 Get a unit handle of the calling work unit. More...
 
int ABT_self_yield (void)
 Yield the calling ULT to its parent ULT. More...
 
int ABT_self_suspend (void)
 Suspend the calling ULT. More...
 
int ABT_self_exit (void)
 Terminate a calling ULT. More...
 
int ABT_self_set_arg (void *arg)
 Set an argument for a work-unit function of the calling work unit. More...
 
int ABT_self_get_arg (void **arg)
 Retrieve an argument for a work-unit function of the calling work unit. More...
 
int ABT_self_get_thread_func (void(**thread_func)(void *))
 Retrieve a work-unit function of the calling work unit. More...
 
int ABT_self_is_unnamed (ABT_bool *is_unnamed)
 Check if the calling work unit is unnamed. More...
 

Detailed Description

This group is for the self wok unit.

Function Documentation

◆ ABT_self_exit()

int ABT_self_exit ( void  )

Terminate a calling ULT.

ABT_self_exit() terminates the calling ULT. This routine does not return if it succeeds.

Execution context
This routine can be called in a ULT context. Argobots must be initialized. This routine may switch the context of the calling ULT.
Errors
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
ABT_ERR_INV_THREAD is returned if the caller is a tasklet.
ABT_ERR_INV_THREAD is returned if the caller is the primary ULT.
Undefined behavior
If Argobots is not initialized, the results are undefined.
Returns
Error code

Definition at line 656 of file self.c.

◆ ABT_self_get_arg()

int ABT_self_get_arg ( void **  arg)

Retrieve an argument for a work-unit function of the calling work unit.

ABT_self_get_arg() returns the argument that is passed to the caller's work-unit function through arg.

Changes from Argobots 1.x to Argobots 2.0 (planned)

[Argobots 1.x] This routine returns ABT_ERR_UNINITIALIZED if Argobots is not initialized.
[Argobots 2.0] The results of this routine are undefined if Argobots is not initialized.

Rationale
From Argobots 2.0, Argobots routines do not check if Argobots is initialized unless otherwise noted. This omission can reduce the branches that are unnecessary in most cases.

[Argobots 1.x] arg is set to NULL if an error occurs.
[Argobots 2.0] arg is not updated if an error occurs.

Rationale
To ensure the atomicity of the API, Argobots 2.0 guarantees that the routine has no effect when an error is returned unless otherwise noted. Argobots 2.0 does not update arg when an error occurs.
Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
[Argobots 1.x] ABT_ERR_UNINITIALIZED is returned if the Argobots runtime is not initialized.
Undefined behavior
If arg is NULL, the results are undefined.
[Argobots 2.0] If Argobots is not initialized, the results are undefined.
Parameters
[out]argargument for the caller's function
Returns
Error code

Definition at line 738 of file self.c.

◆ ABT_self_get_last_pool()

int ABT_self_get_last_pool ( ABT_pool pool)

Get the last pool of the calling work unit.

ABT_self_get_last_pool() returns the last pool associated with the calling work unit through pool.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If Argobots is not initialized, the results are undefined.
If pool is NULL, the results are undefined.
Parameters
[out]poolpool handle
Returns
Error code

Definition at line 436 of file self.c.

◆ ABT_self_get_last_pool_id()

int ABT_self_get_last_pool_id ( int *  pool_id)

Get ID of the last pool of the calling work unit.

ABT_self_get_last_pool_id() returns the last pool's ID of the calling work unit through pool_id.

Changes from Argobots 1.x to Argobots 2.0 (planned)

[Argobots 1.x] This routine returns ABT_ERR_UNINITIALIZED if Argobots is not initialized.
[Argobots 2.0] The results of this routine are undefined if Argobots is not initialized.

Rationale
From Argobots 2.0, Argobots routines do not check if Argobots is initialized unless otherwise noted. This omission can reduce the branches that are unnecessary in most cases.

[Argobots 1.x] pool_id is set to -1 if an error occurs.
[Argobots 2.0] pool_id is not updated if an error occurs.

Rationale
To ensure the atomicity of the API, Argobots 2.0 guarantees that the routine has no effect when an error is returned unless otherwise noted. Argobots 2.0 does not update pool_id when an error occurs.
Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
[Argobots 1.x] ABT_ERR_UNINITIALIZED is returned if the Argobots runtime is not initialized.
Undefined behavior
If pool_id is NULL, the results are undefined.
[Argobots 2.0] If Argobots is not initialized, the results are undefined.
Parameters
[out]pool_idpool ID
Returns
Error code

Definition at line 474 of file self.c.

◆ ABT_self_get_specific()

int ABT_self_get_specific ( ABT_key  key,
void **  value 
)

Get a value associated with a work-unit-specific data key in the calling work unit.

ABT_self_get_specific() returns the value in the caller associated with the work-unit-specific data key key in the calling work unit through value. If the caller has never set a value for key, this routine sets value to NULL.

Work-unit-specific values associated with a work-unit-specific data key are read and updated atomically.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
ABT_ERR_INV_KEY is returned if key is ABT_KEY_NULL.
Undefined behavior
If value is NULL, the results are undefined.
If Argobots is not initialized, the results are undefined.
Parameters
[in]keywork-unit-specific data key handle
[out]valuevalue associated with key
Returns
Error code

Definition at line 226 of file self.c.

◆ ABT_self_get_task()

int ABT_self_get_task ( ABT_thread thread)

Get the calling work unit.

The functionality of this routine is the same as ABT_self_get_thread().

◆ ABT_self_get_task_id()

int ABT_self_get_task_id ( ABT_unit_id id)

Get ID of the calling work unit.

The functionality of this routine is the same as ABT_self_get_thread_id().

◆ ABT_self_get_thread()

int ABT_self_get_thread ( ABT_thread thread)

Get the calling work unit.

ABT_self_get_thread() returns the handle of the calling work unit through thread.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If thread is NULL, the results are undefined.
If Argobots is not initialized, the results are undefined.
Parameters
[out]threadwork unit handle
Returns
Error code

Definition at line 95 of file self.c.

◆ ABT_self_get_thread_func()

int ABT_self_get_thread_func ( void(**)(void *)  thread_func)

Retrieve a work-unit function of the calling work unit.

ABT_self_get_thread_func() returns the work-unit function of the calling work unit through thread_func.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If Argobots is not initialized, the results are undefined.
If thread_func is NULL, the results are undefined.
Parameters
[out]thread_functhe caller's function
Returns
Error code

Definition at line 772 of file self.c.

◆ ABT_self_get_thread_id()

int ABT_self_get_thread_id ( ABT_unit_id id)

Get ID of the calling work unit.

ABT_self_get_thread_id() returns the ID of the calling work unit through id.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If id is NULL, the results are undefined.
If Argobots is not initialized, the results are undefined.
Parameters
[out]idID of the calling work unit
Returns
Error code

Definition at line 124 of file self.c.

◆ ABT_self_get_type()

int ABT_self_get_type ( ABT_unit_type type)

Obtain a type of the caller.

ABT_self_get_type() returns a type of the calling work unit through type. If the caller is a ULT, type is set to ABT_UNIT_TYPE_THREAD. If the caller is a tasklet, type is set to ABT_UNIT_TYPE_TASK. Otherwise (i.e., if the caller is an external thread), type is set to ABT_UNIT_TYPE_EXT.

Changes from Argobots 1.x to Argobots 2.0 (planned)

[Argobots 1.x] If an external thread calls this routine, ABT_ERR_INV_XSTREAM is returned.
[Argobots 2.0] An external thread may call this routine.

Rationale
Argobots 2.0 allows an external thread where possible unless it is semantically inappropriate.

[Argobots 1.x] This routine returns ABT_ERR_UNINITIALIZED if Argobots is not initialized.
[Argobots 2.0] The results of this routine are undefined if Argobots is not initialized.

Rationale
From Argobots 2.0, Argobots routines do not check if Argobots is initialized unless otherwise noted. This omission can reduce the branches that are unnecessary in most cases.

[Argobots 1.x] type is set to ABT_UNIT_TYPE_EXT if an error occurs.
[Argobots 2.0] type is not updated if an error occurs.

Rationale
To ensure the atomicity of the API, Argobots 2.0 guarantees that the routine has no effect when an error is returned unless otherwise noted. Argobots 2.0 does not update type when an error occurs.
Execution context
[Argobots 1.x] This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
[Argobots 2.0] This routine can be called in any execution context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
[Argobots 1.x] ABT_ERR_UNINITIALIZED is returned if the Argobots runtime is not initialized.
[Argobots 1.x] ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If type is NULL, the results are undefined.
[Argobots 2.0] If Argobots is not initialized, the results are undefined.
Parameters
[out]typework unit type
Returns
Error code

Definition at line 274 of file self.c.

◆ ABT_self_get_unit()

int ABT_self_get_unit ( ABT_unit unit)

Get a unit handle of the calling work unit.

ABT_self_get_unit() returns the ABT_unit handle associated with the calling work unit through unit.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If Argobots is not initialized, the results are undefined.
If unit is NULL, the results are undefined.
Parameters
[out]unitwork unit handle
Returns
Error code

Definition at line 553 of file self.c.

◆ ABT_self_get_xstream()

int ABT_self_get_xstream ( ABT_xstream xstream)

Get an execution stream that is running the calling work unit.

ABT_self_get_xstream() returns the handle of the execution stream that is running the calling work unit through xstream.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If xstream is NULL, the results are undefined.
If Argobots is not initialized, the results are undefined.
Parameters
[out]xstreamexecution stream handle
Returns
Error code

Definition at line 33 of file self.c.

◆ ABT_self_get_xstream_rank()

int ABT_self_get_xstream_rank ( int *  rank)

Return a rank of an execution stream that is running the calling work unit.

ABT_self_get_xstream_rank() returns the rank of the execution stream that is running the calling work unit through rank.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If rank is NULL, the results are undefined.
If Argobots is not initialized, the results are undefined.
Parameters
[out]rankexecution stream rank
Returns
Error code

Definition at line 65 of file self.c.

◆ ABT_self_is_primary()

int ABT_self_is_primary ( ABT_bool is_primary)

Check if the caller is the primary ULT.

ABT_self_is_primary() checks whether the caller is the primary ULT and returns the result through is_primary. If the caller is the primary ULT, is_primary is set to ABT_TRUE. Otherwise, is_primary is set to ABT_FALSE.

Changes from Argobots 1.x to Argobots 2.0 (planned)

[Argobots 1.x] If a tasklet calls this routine, ABT_ERR_INV_THREAD is returned.
[Argobots 2.0] A tasklet may call this routine.

Rationale
Argobots 2.0 integrates a ULT and a tasklet into a single thread concept to make the API more general.

[Argobots 1.x] If an external thread calls this routine, ABT_ERR_INV_XSTREAM is returned.
[Argobots 2.0] An external thread may call this routine.

Rationale
Argobots 2.0 allows an external thread where possible unless it is semantically inappropriate.

[Argobots 1.x] This routine returns ABT_ERR_UNINITIALIZED if Argobots is not initialized.
[Argobots 2.0] The results of this routine are undefined if Argobots is not initialized.

Rationale
From Argobots 2.0, Argobots routines do not check if Argobots is initialized unless otherwise noted. This omission can reduce the branches that are unnecessary in most cases.

[Argobots 1.x] is_primary is set to ABT_FALSE if an error occurs.
[Argobots 2.0] is_primary is not updated if an error occurs.

Rationale
To ensure the atomicity of the API, Argobots 2.0 guarantees that the routine has no effect when an error is returned unless otherwise noted. Argobots 2.0 does not update is_primary when an error occurs.
Execution context
[Argobots 1.x] This routine can be called in a ULT context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
[Argobots 2.0] This routine can be called in any execution context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
[Argobots 1.x] ABT_ERR_UNINITIALIZED is returned if the Argobots runtime is not initialized.
[Argobots 1.x] ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
[Argobots 1.x] ABT_ERR_INV_THREAD is returned if the caller is a tasklet.
Undefined behavior
If is_primary is NULL, the results are undefined.
[Argobots 2.0] If Argobots is not initialized, the results are undefined.
Parameters
[out]is_primaryresult (ABT_TRUE: primary ULT, ABT_FALSE: not)
Returns
Error code

Definition at line 331 of file self.c.

◆ ABT_self_is_unnamed()

int ABT_self_is_unnamed ( ABT_bool is_unnamed)

Check if the calling work unit is unnamed.

ABT_self_is_unnamed() checks if the calling work unit is unnamed and returns the result through is_unnamed. is_unnamed is set to ABT_TRUE if the calling work unit is unnamed. Otherwise, is_unnamed is set to ABT_FALSE.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If Argobots is not initialized, the results are undefined.
If is_unnamed is NULL, the results are undefined.
Parameters
[out]is_unnamedresult (ABT_TRUE: unnamed, ABT_FALSE: not)
Returns
Error code

Definition at line 804 of file self.c.

◆ ABT_self_on_primary_xstream()

int ABT_self_on_primary_xstream ( ABT_bool on_primary)

Check if the caller is running on the primary execution stream.

ABT_self_on_primary_xstream() checks whether the caller is running on the primary execution stream and returns the result through on_primary. If the caller is a work unit running on the primary execution stream, on_primary is set to ABT_TRUE. Otherwise, on_primary is set to ABT_FALSE.

Changes from Argobots 1.x to Argobots 2.0 (planned)

[Argobots 1.x] If an external thread calls this routine, ABT_ERR_INV_XSTREAM is returned.
[Argobots 2.0] An external thread may call this routine.

Rationale
Argobots 2.0 allows an external thread where possible unless it is semantically inappropriate.

[Argobots 1.x] This routine returns ABT_ERR_UNINITIALIZED if Argobots is not initialized.
[Argobots 2.0] The results of this routine are undefined if Argobots is not initialized.

Rationale
From Argobots 2.0, Argobots routines do not check if Argobots is initialized unless otherwise noted. This omission can reduce the branches that are unnecessary in most cases.

[Argobots 1.x] on_primary is set to ABT_FALSE if an error occurs.
[Argobots 2.0] on_primary is not updated if an error occurs.

Rationale
To ensure the atomicity of the API, Argobots 2.0 guarantees that the routine has no effect when an error is returned unless otherwise noted. Argobots 2.0 does not update on_primary when an error occurs.
Execution context
[Argobots 1.x] This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
[Argobots 2.0] This routine can be called in any execution context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
[Argobots 1.x] ABT_ERR_UNINITIALIZED is returned if the Argobots runtime is not initialized.
[Argobots 1.x] ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If on_primary is NULL, the results are undefined.
[Argobots 2.0] If Argobots is not initialized, the results are undefined.
Parameters
[out]on_primaryresult (ABT_TRUE: primary execution stream, ABT_FALSE: not)
Returns
Error code

Definition at line 391 of file self.c.

◆ ABT_self_set_arg()

int ABT_self_set_arg ( void *  arg)

Set an argument for a work-unit function of the calling work unit.

ABT_self_set_arg() sets the argument arg for the caller's work-unit function.

Note
The new argument will be used if the calling work unit is revived.
Changes from Argobots 1.x to Argobots 2.0 (planned)
[Argobots 1.x] This routine returns ABT_ERR_UNINITIALIZED if Argobots is not initialized.
[Argobots 2.0] The results of this routine are undefined if Argobots is not initialized.
Rationale
From Argobots 2.0, Argobots routines do not check if Argobots is initialized unless otherwise noted. This omission can reduce the branches that are unnecessary in most cases.
Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
[Argobots 1.x] ABT_ERR_UNINITIALIZED is returned if the Argobots runtime is not initialized.
Undefined behavior
If the caller is accessed concurrently, the results are undefined.
[Argobots 2.0] If Argobots is not initialized, the results are undefined.
Parameters
[in]argargument a work-unit function of the calling work unit
Returns
Error code

Definition at line 697 of file self.c.

◆ ABT_self_set_associated_pool()

int ABT_self_set_associated_pool ( ABT_pool  pool)

Set an associated pool for the calling work unit.

ABT_self_set_associated_pool() changes the associated pool of the work unit thread to the pool pool. This routine does not yield the calling work unit.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
ABT_ERR_INV_POOL is returned if pool is ABT_POOL_NULL.
ABT_ERR_MEM is returned if memory allocation fails.
ABT_ERR_SYS is returned if an error related to system calls and standard libraries occurs.
ABT_ERR_UNIT is returned if u_create_from_thread() fails.
Undefined behavior
If Argobots is not initialized, the results are undefined.
If the caller is accessed concurrently, the results are undefined.
Parameters
[in]poolpool handle
Returns
Error code

Definition at line 518 of file self.c.

◆ ABT_self_set_specific()

int ABT_self_set_specific ( ABT_key  key,
void *  value 
)

Associate a value with a work-unit-specific data key in the calling work unit.

ABT_self_set_specific() associates a value value with the work-unit-specific data key key in the calling work unit. Different work units may bind different values to the same key.

Work-unit-specific values associated with a work-unit-specific data key are read and updated atomically.

Execution context
This routine can be called in a ULT context or a tasklet context. Argobots must be initialized. This routine does not switch the context of the calling ULT unless any user-defined function that is involved in this routine switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
ABT_ERR_INV_KEY is returned if key is ABT_KEY_NULL.
ABT_ERR_MEM is returned if memory allocation fails.
ABT_ERR_SYS is returned if an error related to system calls and standard libraries occurs.
Undefined behavior
If Argobots is not initialized, the results are undefined.
Parameters
[in]keywork-unit-specific data key handle
[in]valuevalue associated with key
Returns
Error code

Definition at line 179 of file self.c.

◆ ABT_self_suspend()

int ABT_self_suspend ( void  )

Suspend the calling ULT.

ABT_self_suspend() suspends the execution of the calling ULT and switches to its parent ULT. The calling ULT is not pushed to its associated pool and its state becomes blocked. ABT_thread_resume() awakens the suspended ULT and pushes it back to its associated pool.

Changes from Argobots 1.0 to Argobots 1.1
[Argobots 1.0] ABT_ERR_INV_THREAD is returned if this routine is called by an external thread.
[Argobots 1.1] ABT_ERR_INV_XSTREAM is returned if this routine is called by an external thread.
Rationale
Argobots 1.0 returned a wrong error code. Argobots 1.1 fixes the error code for consistent behavior with other Argobots routines.
Execution context
This routine can be called in a ULT context. Argobots must be initialized. This routine may switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
ABT_ERR_INV_THREAD is returned if the caller is a tasklet.
Undefined behavior
If Argobots is not initialized, the results are undefined.
If the caller is accessed concurrently, the results are undefined.
Returns
Error code

Definition at line 624 of file self.c.

◆ ABT_self_yield()

int ABT_self_yield ( void  )

Yield the calling ULT to its parent ULT.

ABT_self_yield() yields the calling ULT and pushes the calling ULT to its associated pool. Its parent ULT will be resumed.

Execution context
This routine can be called in a ULT context. Argobots must be initialized. This routine may switch the context of the calling ULT.
Errors
ABT_SUCCESS is returned if this routine succeeds.
ABT_ERR_INV_THREAD is returned if the caller is a tasklet.
ABT_ERR_INV_XSTREAM is returned if the caller is an external thread.
Undefined behavior
If Argobots is not initialized, the results are undefined.
If the caller is accessed concurrently, the results are undefined.
Returns
Error code

Definition at line 583 of file self.c.