Back to index

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

Go to the source code of this file.

Functions

int __pthread_mutex_destroy (pthread_mutex_t *mutex)

Function Documentation

Definition at line 25 of file pthread_mutex_destroy.c.

{
  if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0
      && mutex->__data.__nusers != 0)
    return EBUSY;

  /* Set to an invalid value.  */
  mutex->__data.__kind = -1;

  return 0;
}