pthread_rwlockattr_destroy(), pthread_rwlockattr_init()

destroy and initialize the read-write lock attributes object 

Advanced Realtime Threads


SYNOPSIS

#include <pthread.h>

int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr);

int pthread_rwlockattr_init(pthread_rwlockattr_t *attr);


DESCRIPTION

The pthread_rwlockattr_destroy() function shall destroys a read-write lock attributes object. Once destroyed, an attributes object can be reinitialized with the pthread_rwlockattr_init() function.

The pthread_rwlockattr_init() function initializes the specified read-write lock attributes object attr with the default values for all attributes.

Once a read-write lock attributes object has been used to initialize a read-write lock, changes affecting the attributes object by any function (including destruction) has no affect on the previously initialized read-write locks.


PARAMETERS

attr 

Points to a read-write lock attributes object.


RETURN VALUES

On success, the pthread_rwlockattr_destroy() and pthread_rwlockattr_init() functions return zero. On failure, they return one of the following error numbers:

EINVAL 

The attr attribute points to an invalid value.

ENOMEM 

There is not enough memory to initialize the read-write lock attributes object.


CONFORMANCE

UNIX 03.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition

SEE ALSO

Functions:
pthread_rwlock_destroy(), pthread_rwlockattr_getpshared(), pthread_rwlockattr_setpshared()


PTC MKS Toolkit 10.3 Documentation Build 39.