pthread_rwlock_attr.h File Reference

Implementation of a fair, POSIX conforming reader/writer lock (attribute set). More...

Detailed Description

Implementation of a fair, POSIX conforming reader/writer lock (attribute set).

Note
Do not include this header file directly, but pthread.h.

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...
 

Functions

int pthread_rwlockattr_init (pthread_rwlockattr_t *attr)
 Initilize 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...
 

Function Documentation

◆ pthread_rwlockattr_destroy()

int pthread_rwlockattr_destroy ( pthread_rwlockattr_t attr)

Destroy an attribute set.

This function does nothing, don't bother calling it.

Parameters
[in,out]attrAttribute set to destroy.
Returns
0 on success. EINVAL if attr == NULL.

◆ pthread_rwlockattr_getpshared()

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.

Parameters
[in]attrAttribute set to query.
[out]psharedEither PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
Returns
0 on success. EINVAL if attr == NULL.

◆ pthread_rwlockattr_init()

int pthread_rwlockattr_init ( pthread_rwlockattr_t attr)

Initilize the attribute set with the defaults.

Default value for pshared: PTHREAD_PROCESS_PRIVATE. A zeroed out datum is initialized.

Parameters
[in,out]attrAttribute set to initialize.
Returns
0 on success. EINVAL if attr == NULL.

◆ pthread_rwlockattr_setpshared()

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.

Parameters
[in,out]attrAttribute set to operate on.
[in]psharedEither PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
Returns
0 on success. EINVAL if attr == NULL or a wrong value for pshared was supplied.