ARGOBOTS
Functions
Mutex Attributes

Functions

int ABT_mutex_attr_create (ABT_mutex_attr *newattr)
 Create a new mutex attribute object. More...
 
int ABT_mutex_attr_free (ABT_mutex_attr *attr)
 Free the mutex attribute object. More...
 
int ABT_mutex_attr_set_recursive (ABT_mutex_attr attr, ABT_bool recursive)
 Set the recursive property in the attribute object. More...
 

Detailed Description

Attributes are used to specify mutex behavior that is different from the default. When a mutex is created with ABT_mutex_create_with_attr(), attributes can be specified with an ABT_mutex_attr object.

Function Documentation

int ABT_mutex_attr_create ( ABT_mutex_attr newattr)

Create a new mutex attribute object.

ABT_mutex_attr_create() creates a mutex 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 mutex.

Parameters
[out]newattrhandle to a new attribute object
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 26 of file mutex_attr.c.

int ABT_mutex_attr_free ( ABT_mutex_attr attr)

Free the mutex attribute object.

ABT_mutex_attr_free() deallocates memory used for the mutex attribute object. If this function successfully returns, attr will be set to ABT_MUTEX_ATTR_NULL.

Parameters
[in,out]attrhandle to the target attribute object
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 58 of file mutex_attr.c.

int ABT_mutex_attr_set_recursive ( ABT_mutex_attr  attr,
ABT_bool  recursive 
)

Set the recursive property in the attribute object.

ABT_mutex_attr_set_recursive() sets the recursive property (i.e., whether the mutex can be locked multiple times by the same owner) in the attribute object associated with handle attr.

Parameters
[in]attrhandle to the target attribute object
[in]recursiveboolean value for the recursive locking support
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 92 of file mutex_attr.c.