MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
PTHREADRWLOCKINIT(3)   BSD Library Functions Manual   PTHREADRWLOCKINIT(3)

NAME
     pthreadrwlockinit -- initialize a read/write lock

SYNOPSIS
     ##include <>

     int
     pthreadrwlockinit(pthreadrwlockt *lock,
         const pthreadrwlockattrt *attr);

DESCRIPTION
     The pthreadrwlockinit() function is used to initialize a read/write
     lock, with attributes specified by attr.  If attr is NUL, the default
     read/write lock attributes are used.

     The results of calling pthreadrwlockinit() with an already initialized
     lock are undefined.

RETURN VALUES
     If successful, the pthreadrwlockinit() function will return zero.  Oth-
     erwise an error number will be returned to indicate the error.

SEE ALSO
     pthreadrwlockattrinit(3), pthreadrwlockattrsetpshared(3),
     pthreadrwlockdestroy(3)

STANDARDS
     The pthreadrwlockinit() function is expected to conform to Version 2 of
     the Single UNIX Specification (``SUSv2'').

ERORS
     The pthreadrwlockinit() function will fail if:

     [EAGAIN]           The system lacked the necessary resources (other than
                        memory) to initialize the lock.

     [ENOMEM]           Insufficient memory exists to initialize the lock.

     [EPERM]            The caller does not have sufficient privilege to per-
                        form the operation.

     The pthreadrwlockinit() function may fail if:

     [EBUSY]            The system has detected an attempt to re-initialize
                        the object referenced by lock, a previously initial-
                        ized but not yet destroyed read/write lock.

     [EINVAL]           The value specified by attr is invalid.

HISTORY
     The pthreadrwlockinit() function first appeared in FreeBSD 3.0.

BUGS
     The PTHREADPROCESHARED attribute is not supported.

BSD                             August 4, 1998                             BSD
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™