|
ARGOBOTS
1.1
|
This group is for Mutex Attributes. Mutex attributes are used to specify mutex behavior that is different from the default. More...
Typedefs | |
| typedef struct ABT_mutex_attr_opaque * | ABT_mutex_attr |
| Mutex attribute handle type. More... | |
Functions | |
| int | ABT_mutex_attr_create (ABT_mutex_attr *newattr) |
| Create a new mutex attribute. More... | |
| int | ABT_mutex_attr_free (ABT_mutex_attr *attr) |
| Free a mutex attribute. More... | |
| int | ABT_mutex_attr_set_recursive (ABT_mutex_attr attr, ABT_bool recursive) |
| Set a recursive property in a mutex attribute. More... | |
| int | ABT_mutex_attr_get_recursive (ABT_mutex_attr attr, ABT_bool *recursive) |
| Get a recursive property in a mutex attribute. More... | |
This group is for Mutex Attributes. Mutex attributes are used to specify mutex behavior that is different from the default.
| typedef struct ABT_mutex_attr_opaque* ABT_mutex_attr |
| int ABT_mutex_attr_create | ( | ABT_mutex_attr * | newattr | ) |
Create a new mutex attribute.
ABT_mutex_attr_create() creates a new mutex attribute with default attribute values and returns its handle through newattr.
The default parameters are as follows:
newattr must be freed by ABT_mutex_attr_free() after its use.
ABT_SUCCESS is returned if this routine succeeds.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.newattr is NULL, the results are undefined.| [out] | newattr | mutex attribute handle |
Definition at line 39 of file mutex_attr.c.
| int ABT_mutex_attr_free | ( | ABT_mutex_attr * | attr | ) |
Free a mutex attribute.
ABT_mutex_attr_free() deallocates the resource used for the mutex attribute attr and sets attr to ABT_MUTEX_ATTR_NULL.
ABT_SUCCESS is returned if this routine succeeds.ABT_ERR_INV_MUTEX_ATTR is returned if attr points to ABT_MUTEX_ATTR_NULL.attr is NULL, the results are undefined.attr is accessed after calling this routine, the results are undefined.| [in,out] | attr | mutex attribute handle |
Definition at line 76 of file mutex_attr.c.
| int ABT_mutex_attr_get_recursive | ( | ABT_mutex_attr | attr, |
| ABT_bool * | recursive | ||
| ) |
Get a recursive property in a mutex attribute.
ABT_mutex_attr_get_recursive() retrieves the recursive property (i.e., whether the mutex can be locked multiple times by the same owner or not) in the mutex attribute attr. If attr is configured to be recursive, recursive is set to ABT_TRUE. Otherwise, recursive is set to ABT_FALSE.
ABT_SUCCESS is returned if this routine succeeds.ABT_ERR_INV_MUTEX_ATTR is returned if attr is ABT_MUTEX_ATTR_NULL.recursive is NULL, the results are undefined.| [in] | attr | mutex attribute handle |
| [in] | recursive | flag for a recursive locking support |
Definition at line 153 of file mutex_attr.c.
| int ABT_mutex_attr_set_recursive | ( | ABT_mutex_attr | attr, |
| ABT_bool | recursive | ||
| ) |
Set a recursive property in a mutex attribute.
ABT_mutex_attr_set_recursive() sets the recursive property (i.e., whether the mutex can be locked multiple times by the same owner or not) in the mutex attribute attr. If recursive is ABT_TRUE, the recursive flag of attr is set. Otherwise, the recursive flag of attr is unset.
ABT_SUCCESS is returned if this routine succeeds.ABT_ERR_INV_MUTEX_ATTR is returned if attr is ABT_MUTEX_ATTR_NULL.recursive is neither ABT_TRUE nor ABT_FALSE, the results are undefined.attr is accessed concurrently, the results are undefined.| [in] | attr | mutex attribute handle |
| [in] | recursive | flag for a recursive locking support |
Definition at line 114 of file mutex_attr.c.
1.8.17