MirOS Manual: pthread_mutexattr(3), pthread_mutexattr_destroy(3), pthread_mutexattr_getprioceiling(3), pthread_mutexattr_getprotocol(3), pthread_mutexattr_getpshared(3), pthread_mutexattr_gettype(3), pthread_mutexattr_init(3), pthread_mutexattr_setprioceiling(3), pthread_mutexattr_setprotocol(3), pthread_mutexattr_setpshared(3), pthread_mutexattr_settype(3)

PTHREAD_MUTEXATTR(3)       BSD Programmer's Manual        PTHREAD_MUTEXATTR(3)

NAME

     pthread_mutexattr_init, pthread_mutexattr_destroy,
     pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling,
     pthread_mutexattr_setprotocol, pthread_mutexattr_getprotocol,
     pthread_mutexattr_settype, pthread_mutexattr_gettype - mutex attribute
     operations

SYNOPSIS

     #include <pthread.h>

     int
     pthread_mutexattr_init(pthread_mutexattr_t *attr);

     int
     pthread_mutexattr_destroy(pthread_mutexattr_t *attr);

     int
     pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr,
             int prioceiling);

     int
     pthread_mutexattr_getprioceiling(pthread_mutexattr_t *attr,
             int *prioceiling);

     int
     pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol);

     int
     pthread_mutexattr_getprotocol(pthread_mutexattr_t *attr, int *protocol);

     int
     pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);

     int
     pthread_mutexattr_gettype(pthread_mutexattr_t *attr, int *type);

DESCRIPTION

     Mutex attributes are used to specify parameters to pthread_mutex_init().
     One attribute object can be used in multiple calls to
     pthread_mutex_init(), with or without modifications between calls.

     The pthread_mutexattr_init() function initializes attr with all the de-
     fault mutex attributes.

     The pthread_mutexattr_destroy() function destroys attr.

     The pthread_mutexattr_set*() functions set the attribute that corresponds
     to each function name.

     The pthread_mutexattr_get*() functions copy the value of the attribute
     that corresponds to each function name to the location pointed to by the
     second function parameter.

RETURN VALUES

     If successful, these functions return 0. Otherwise, an error number is
     returned to indicate the error.

ERRORS

     pthread_mutexattr_init() will fail if:

     [ENOMEM]      Out of memory.

     pthread_mutexattr_destroy() will fail if:

     [EINVAL]      Invalid value for attr.

     pthread_mutexattr_setprioceiling() will fail if:

     [EINVAL]      Invalid value for attr, or invalid value for prioceiling.

     pthread_mutexattr_getprioceiling() will fail if:

     [EINVAL]      Invalid value for attr.

     pthread_mutexattr_setprotocol() will fail if:

     [EINVAL]      Invalid value for attr, or invalid value for protocol.

     pthread_mutexattr_getprotocol() will fail if:

     [EINVAL]      Invalid value for attr.

     pthread_mutexattr_settype() will fail if:

     [EINVAL]      Invalid value for attr, or invalid value for type.

     pthread_mutexattr_gettype() will fail if:

     [EINVAL]      Invalid value for attr.

SEE ALSO

     pthread_mutex_init(3)

STANDARDS

     pthread_mutexattr_init() and pthread_mutexattr_destroy() conform to
     ISO/IEC 9945-1:1996 ("POSIX")

     pthread_mutexattr_setprioceiling(), pthread_mutexattr_getprioceiling(),
     pthread_mutexattr_setprotocol(), pthread_mutexattr_getprotocol(),
     pthread_mutexattr_settype(), and pthread_mutexattr_gettype() conform to
     Version 2 of the Single UNIX Specification

MirOS BSD #10-current            May 1, 2000                                 1

Generated on 2014-07-04 21:17:45 by $MirOS: src/scripts/roff2htm,v 1.79 2014/02/10 00:36:11 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002‒2014 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.