Back to index

glibc  2.9
Functions
pthread_cond_init.c File Reference
#include <shlib-compat.h>
#include "pthreadP.h"

Go to the source code of this file.

Functions

int __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *cond_attr)
 versioned_symbol (libpthread, __pthread_cond_init, pthread_cond_init, GLIBC_2_3_2)

Function Documentation

Definition at line 26 of file pthread_cond_init.c.

{
  struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr;

  cond->__data.__lock = LLL_LOCK_INITIALIZER;
  cond->__data.__futex = 0;
  cond->__data.__nwaiters = (icond_attr != NULL
                          ? ((icond_attr->value >> 1)
                            & ((1 << COND_NWAITERS_SHIFT) - 1))
                          : CLOCK_REALTIME);
  cond->__data.__total_seq = 0;
  cond->__data.__wakeup_seq = 0;
  cond->__data.__woken_seq = 0;
  cond->__data.__mutex = (icond_attr == NULL || (icond_attr->value & 1) == 0
                       ? NULL : (void *) ~0l);
  cond->__data.__broadcast_seq = 0;

  return 0;
}

Here is the call graph for this function:

versioned_symbol ( libpthread  ,
__pthread_cond_init  ,
pthread_cond_init  ,
GLIBC_2_3_2   
)