pthread_mutexattr_setprotocol

Sets the protocol attribute in the mutex attribute object.

Library:LibC
Classification:POSIX
Service:Synchronization

Syntax

  #include <pthread.h>
   
  int pthread_mutexattr_setprotocol (
     pthread_mutexattr_t   *attr,
     int                    protocol);
  

Parameters

attr

(IN) Points to the mutex attribute object.

protocol

(IN) Specifies the value for the protocol attribute. For a list of supported values, see Section 48.1.3, Protocol Attribute Flags.

Return Values

If successful, returns zero. Otherwise, returns one of the following values.

Decimal

Constant

Description

9

EINVAL

The protocol parameter is invalid.

79

ENOTSUP

The protocol parameter is set to an unsupported value.

Remarks

The protocol attribute defines the protocol to be followed in utilizing mutexes. On NetWare, this attribute can be set, but it currently has no effect on the behavior of the mutex.

See Also