ARGOBOTS
|
Functions | |
int | ABT_thread_attr_create (ABT_thread_attr *newattr) |
Create a new ULT attribute object. More... | |
int | ABT_thread_attr_free (ABT_thread_attr *attr) |
Free the ULT attribute object. More... | |
int | ABT_thread_attr_set_stack (ABT_thread_attr attr, void *stackaddr, size_t stacksize) |
Set stack attributes. More... | |
int | ABT_thread_attr_get_stack (ABT_thread_attr attr, void **stackaddr, size_t *stacksize) |
Get stack attributes. More... | |
int | ABT_thread_attr_set_stacksize (ABT_thread_attr attr, size_t stacksize) |
Set the stack size in the attribute object. More... | |
int | ABT_thread_attr_get_stacksize (ABT_thread_attr attr, size_t *stacksize) |
Get the stack size from the attribute object. More... | |
int | ABT_thread_attr_set_callback (ABT_thread_attr attr, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) |
Set callback function and its argument in the attribute object. More... | |
int | ABT_thread_attr_set_migratable (ABT_thread_attr attr, ABT_bool flag) |
Set the ULT's migratability in the attribute object. More... | |
Attributes are used to specify ULT behavior that is different from the default. When a ULT is created with ABT_thread_create()
, attributes can be specified with an ABT_thread_attr
object.
int ABT_thread_attr_create | ( | ABT_thread_attr * | newattr | ) |
Create a new ULT attribute object.
ABT_thread_attr_create()
creates a ULT attribute object with default attribute values. The handle to the attribute object is returned through newattr
. The attribute object can be used in more than one ULT.
[out] | newattr | handle to a new attribute object |
ABT_SUCCESS | on success |
Definition at line 26 of file thread_attr.c.
int ABT_thread_attr_free | ( | ABT_thread_attr * | attr | ) |
Free the ULT attribute object.
ABT_thread_attr_free()
deallocates memory used for the ULT attribute object. If this function successfully returns, attr
will be set to ABT_THREAD_ATTR_NULL
.
[in,out] | attr | handle to the target attribute object |
ABT_SUCCESS | on success |
Definition at line 55 of file thread_attr.c.
int ABT_thread_attr_get_stack | ( | ABT_thread_attr | attr, |
void ** | stackaddr, | ||
size_t * | stacksize | ||
) |
Get stack attributes.
ABT_thread_attr_get_stack()
retrieves the stack address and the stack size (in bytes) from the attribute attr
to stackaddr
and stacksize
, respectively.
The user can obtain the ULT's attributes using ABT_thread_get_attr()
.
[in] | attr | handle to the target attribute object |
[out] | stackaddr | stack address |
[out] | stacksize | stack size in bytes |
ABT_SUCCESS | on success |
Definition at line 140 of file thread_attr.c.
int ABT_thread_attr_get_stacksize | ( | ABT_thread_attr | attr, |
size_t * | stacksize | ||
) |
Get the stack size from the attribute object.
ABT_thread_attr_get_stacksize()
returns the stack size (in bytes) through stacksize
from the attribute object associated with handle attr
.
[in] | attr | handle to the target attribute object |
[out] | stacksize | stack size in bytes |
ABT_SUCCESS | on success |
Definition at line 199 of file thread_attr.c.
int ABT_thread_attr_set_callback | ( | ABT_thread_attr | attr, |
void(*)(ABT_thread thread, void *cb_arg) | cb_func, | ||
void * | cb_arg | ||
) |
Set callback function and its argument in the attribute object.
ABT_thread_attr_set_callback()
sets the callback function and its argument, which will be invoked on ULT migration.
[in] | attr | handle to the target attribute object |
[in] | cb_func | callback function pointer |
[in] | cb_arg | argument for the callback function |
ABT_SUCCESS | on success |
Definition at line 228 of file thread_attr.c.
int ABT_thread_attr_set_migratable | ( | ABT_thread_attr | attr, |
ABT_bool | flag | ||
) |
Set the ULT's migratability in the attribute object.
ABT_thread_attr_set_migratable()
sets the ULT's migratability in the target attribute object. If flag
is ABT_TRUE
, the ULT created with this attribute becomes migratable. On the other hand, if \ flag is ABT_FALSE
, the ULT created with this attribute becomes unmigratable.
[in] | attr | handle to the target attribute object |
[in] | flag | migratability flag (ABT_TRUE : migratable, ABT_FALSE : not) |
ABT_SUCCESS | on success |
Definition at line 269 of file thread_attr.c.
int ABT_thread_attr_set_stack | ( | ABT_thread_attr | attr, |
void * | stackaddr, | ||
size_t | stacksize | ||
) |
Set stack attributes.
ABT_thread_attr_set_stack()
sets the stack address and the stack size (in bytes) in the attribute object associated with handle attr
. If attr
is used to create a ULT, the memory pointed to by stackaddr
will be used as the stack area for the new ULT.
If stackaddr
is NULL
, a stack with size stacksize
will be created by the Argobots runtime. If it is not NULL
, it should be aligned by 8 (i.e., stackaddr
& 0x7 must be zero), and the user has to deallocate the stack memory after the ULT, for which attr
was used, terminates.
[in] | attr | handle to the target attribute object |
[in] | stackaddr | stack address |
[in] | stacksize | stack size in bytes |
ABT_SUCCESS | on success |
ABT_ERR_OTHER | invalid stack address |
Definition at line 97 of file thread_attr.c.
int ABT_thread_attr_set_stacksize | ( | ABT_thread_attr | attr, |
size_t | stacksize | ||
) |
Set the stack size in the attribute object.
ABT_thread_attr_set_stacksize()
sets the stack size (in bytes) in the attribute object associated with handle attr
.
[in] | attr | handle to the target attribute object |
[in] | stacksize | stack size in bytes |
ABT_SUCCESS | on success |
Definition at line 170 of file thread_attr.c.