Back to index

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

Go to the source code of this file.

Functions

int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind)

Function Documentation

Definition at line 25 of file pthread_mutexattr_settype.c.

{
  struct pthread_mutexattr *iattr;

  if (kind < PTHREAD_MUTEX_NORMAL || kind > PTHREAD_MUTEX_ADAPTIVE_NP)
    return EINVAL;

  iattr = (struct pthread_mutexattr *) attr;

  iattr->mutexkind = (iattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_BITS) | kind;

  return 0;
}

Here is the caller graph for this function: