Back to index

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

Go to the source code of this file.

Functions

int pthread_mutexattr_getrobust_np (pthread_mutexattr_t *attr, int *robustness) const

Function Documentation

int pthread_mutexattr_getrobust_np ( pthread_mutexattr_t attr,
int robustness 
) const

Definition at line 24 of file pthread_mutexattr_getrobust.c.

{
  const struct pthread_mutexattr *iattr;

  iattr = (const struct pthread_mutexattr *) attr;

  *robustness = ((iattr->mutexkind & PTHREAD_MUTEXATTR_FLAG_ROBUST) != 0
               ? PTHREAD_MUTEX_ROBUST_NP : PTHREAD_MUTEX_STALLED_NP);

  return 0;
}