Standard C Library Functions pthreadrwlockattrinit(3C)
NAME
pthreadrwlockattrinit, pthreadrwlockattrdestroy - ini-
tialize or destroy read-write lock attributes object
SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ]
#include
int pthreadrwlockattrinit(pthreadrwlockattrt *attr);
int pthreadrwlockattrdestroy(pthreadrwlockattrt *attr);
DESCRIPTION
The pthreadrwlockattrinit() function initializes a read-
write lock attributes object attr with the default value for
all of the attributes defined by the implementation.
Results are undefined if pthreadrwlockattrinit() is called
specifying an already initialized read-write lock attributes
object.
After a read-write lock attributes object has been used to
initialize one or more read-write locks, any function
affecting the attributes object (including destruction) does
not affect any previously initialized read-write locks.
The pthreadrwlockattrdestroy() function destroys a read-
write lock attributes object. The effect of subsequent use
of the object is undefined until the object is re-
initialized by another call to pthreadrwlockattrinit(). An
implementation can cause pthreadrwlockattrdestroy() to set
the object referenced by attr to an invalid value.
RETURN VALUES
If successful, the pthreadrwlockattrinit() and
pthreadrwlockattrdestroy() functions return 0. Otherwise,
an error number is returned to indicate the error.
ERORS
The pthreadrwlockattrinit() function will fail if:
ENOMEM Insufficient memory exists to initialize the
read-write lock attributes object.
SunOS 5.11 Last change: 23 Mar 2005 1
Standard C Library Functions pthreadrwlockattrinit(3C)
The pthreadrwlockattrdestroy() function may fail if:
EINVAL The value specified by attr is invalid.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard
MT-Level MT-Safe
SEE ALSO
pthreadrwlockinit(3C), pthreadrwlockrdlock(3C),
pthreadrwlockunlock(3C), pthreadrwlockwrlock(3C),
pthreadrwlockattrgetpshared(3C), attributes(5), stan-
dards(5)
SunOS 5.11 Last change: 23 Mar 2005 2
|