Back to index

glibc  2.9
Functions
pthread_mutexattr_getprotocol.c File Reference
#include <pthreadP.h>

Go to the source code of this file.

Functions

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

Function Documentation

int pthread_mutexattr_getprotocol ( pthread_mutexattr_t attr,
int protocol 
) const

Definition at line 25 of file pthread_mutexattr_getprotocol.c.

{
  const struct pthread_mutexattr *iattr;

  iattr = (const struct pthread_mutexattr *) attr;

  *protocol = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PROTOCOL_MASK)
              >> PTHREAD_MUTEXATTR_PROTOCOL_SHIFT);

  return 0;
}