Implementation of a fair, POSIX conforming reader/writer lock (attribute set). More...
Implementation of a fair, POSIX conforming reader/writer lock (attribute set).
Definition in file pthread_rwlock_attr.h.
#include <errno.h>
Include dependency graph for pthread_rwlock_attr.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | pthread_rwlockattr_t |
| Attributes for a new reader/writer lock. More... | |
| int | pthread_rwlockattr_init (pthread_rwlockattr_t *attr) |
| Initialize the attribute set with the defaults. More... | |
| int | pthread_rwlockattr_destroy (pthread_rwlockattr_t *attr) |
| Destroy an attribute set. More... | |
| int | pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr, int *pshared) |
| Read whether to share the lock with child processes. More... | |
| int | pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared) |
| Set whether to share the lock with child processes. More... | |
| int pthread_rwlockattr_destroy | ( | pthread_rwlockattr_t * | attr | ) |
Destroy an attribute set.
This function does nothing, don't bother calling it.
| [in,out] | attr | Attribute set to destroy. |
0 on success. EINVAL if attr == NULL. | int pthread_rwlockattr_getpshared | ( | const pthread_rwlockattr_t * | attr, |
| int * | pshared | ||
| ) |
Read whether to share the lock with child processes.
There are not child processes in RIOT.
| [in] | attr | Attribute set to query. |
| [out] | pshared | Either PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE. |
0 on success. EINVAL if attr == NULL. | int pthread_rwlockattr_init | ( | pthread_rwlockattr_t * | attr | ) |
Initialize the attribute set with the defaults.
Default value for pshared: PTHREAD_PROCESS_PRIVATE. A zeroed out datum is initialized.
| [in,out] | attr | Attribute set to initialize. |
0 on success. EINVAL if attr == NULL. | int pthread_rwlockattr_setpshared | ( | pthread_rwlockattr_t * | attr, |
| int | pshared | ||
| ) |
Set whether to share the lock with child processes.
There are not child processes in RIOT.
| [in,out] | attr | Attribute set to operate on. |
| [in] | pshared | Either PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE. |
0 on success. EINVAL if attr == NULL or a wrong value for pshared was supplied.