Back to index

glibc  2.9
pthread_mutexattr_init.c File Reference
#include <string.h>
#include <pthreadP.h>

Go to the source code of this file.


int __pthread_mutexattr_init (pthread_mutexattr_t *attr)

Function Documentation

Definition at line 25 of file pthread_mutexattr_init.c.

  if (sizeof (struct pthread_mutexattr) != sizeof (pthread_mutexattr_t))
    memset (attr, '\0', sizeof (*attr));

  /* We use bit 31 to signal whether the mutex is going to be
     process-shared or not.  By default it is zero, i.e., the mutex is
     not process-shared.  */
  ((struct pthread_mutexattr *) attr)->mutexkind = PTHREAD_MUTEX_NORMAL;

  return 0;

Here is the caller graph for this function: