Back to index

glibc  2.9
Classes | Defines | Enumerations | Functions
pthread.h File Reference
#include <features.h>
#include <sched.h>
#include <time.h>
#include <signal.h>
#include <bits/pthreadtypes.h>
#include <bits/initspin.h>
#include <bits/sigthread.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _pthread_cleanup_buffer

Defines

#define __need_sigset_t
#define PTHREAD_MUTEX_INITIALIZER   {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, __LOCK_INITIALIZER}
#define PTHREAD_COND_INITIALIZER   {__LOCK_INITIALIZER, 0, "", 0}
#define PTHREAD_CREATE_JOINABLE   PTHREAD_CREATE_JOINABLE
#define PTHREAD_CREATE_DETACHED   PTHREAD_CREATE_DETACHED
#define PTHREAD_INHERIT_SCHED   PTHREAD_INHERIT_SCHED
#define PTHREAD_EXPLICIT_SCHED   PTHREAD_EXPLICIT_SCHED
#define PTHREAD_SCOPE_SYSTEM   PTHREAD_SCOPE_SYSTEM
#define PTHREAD_SCOPE_PROCESS   PTHREAD_SCOPE_PROCESS
#define PTHREAD_PROCESS_PRIVATE   PTHREAD_PROCESS_PRIVATE
#define PTHREAD_PROCESS_SHARED   PTHREAD_PROCESS_SHARED
#define PTHREAD_ONCE_INIT   0
#define PTHREAD_CANCEL_ENABLE   PTHREAD_CANCEL_ENABLE
#define PTHREAD_CANCEL_DISABLE   PTHREAD_CANCEL_DISABLE
#define PTHREAD_CANCEL_DEFERRED   PTHREAD_CANCEL_DEFERRED
#define PTHREAD_CANCEL_ASYNCHRONOUS   PTHREAD_CANCEL_ASYNCHRONOUS
#define PTHREAD_CANCELED   ((void *) -1)
#define pthread_cleanup_push(routine, arg)
#define pthread_cleanup_pop(execute)   _pthread_cleanup_pop (&_buffer, (execute)); }

Enumerations

enum  { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_JOINABLE }
enum  { PTHREAD_INHERIT_SCHED, PTHREAD_INHERIT_SCHED }
enum  { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_SYSTEM }
enum  { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP }
enum  { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_PRIVATE }
enum  { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_ENABLE }
enum  { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_DEFERRED }

Functions

int pthread_create (pthread_t *__restrict __threadp, __const pthread_attr_t *__restrict __attr, void *(*__start_routine)(void *), void *__restrict __arg) __THROW
pthread_t pthread_self (void) __THROW
int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW
void pthread_exit (void *__retval) __attribute__((__noreturn__))
int pthread_join (pthread_t __th, void **__thread_return)
int pthread_detach (pthread_t __th) __THROW
int pthread_attr_init (pthread_attr_t *__attr) __THROW
int pthread_attr_destroy (pthread_attr_t *__attr) __THROW
int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __THROW
int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, int *__detachstate) __THROW
int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict __param) __THROW
int pthread_attr_getschedparam (__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __THROW
int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __THROW
int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict __attr, int *__restrict __policy) __THROW
int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __THROW
int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __THROW
int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __THROW
int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, int *__restrict __scope) __THROW
int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __THROW
int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW
int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __THROW
int pthread_attr_getstacksize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW
int pthread_setschedparam (pthread_t __target_thread, int __policy, __const struct sched_param *__param) __THROW
int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __THROW
int pthread_mutex_init (pthread_mutex_t *__restrict __mutex, __const pthread_mutexattr_t *__restrict __mutex_attr) __THROW
int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW
int pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROW
int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW
int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW
int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW
int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW
int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *__restrict __attr, int *__restrict __pshared) __THROW
int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __THROW
int pthread_cond_init (pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict __cond_attr) __THROW
int pthread_cond_destroy (pthread_cond_t *__cond) __THROW
int pthread_cond_signal (pthread_cond_t *__cond) __THROW
int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW
int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex)
int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime)
int pthread_condattr_init (pthread_condattr_t *__attr) __THROW
int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW
int pthread_condattr_getpshared (__const pthread_condattr_t *__restrict __attr, int *__restrict __pshared) __THROW
int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __THROW
int pthread_key_create (pthread_key_t *__key, void(*__destr_function)(void *)) __THROW
int pthread_key_delete (pthread_key_t __key) __THROW
int pthread_setspecific (pthread_key_t __key, __const void *__pointer) __THROW
void * pthread_getspecific (pthread_key_t __key) __THROW
int pthread_once (pthread_once_t *__once_control, void(*__init_routine)(void))
int pthread_setcancelstate (int __state, int *__oldstate)
int pthread_setcanceltype (int __type, int *__oldtype)
int pthread_cancel (pthread_t __cancelthread)
void pthread_testcancel (void)
void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer, void(*__routine)(void *), void *__arg) __THROW
void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, int __execute) __THROW
int pthread_atfork (void(*__prepare)(void), void(*__parent)(void), void(*__child)(void)) __THROW
void pthread_kill_other_threads_np (void) __THROW

Define Documentation

#define __need_sigset_t

Definition at line 23 of file pthread.h.

Definition at line 153 of file pthread.h.

Definition at line 151 of file pthread.h.

Definition at line 146 of file pthread.h.

Definition at line 144 of file pthread.h.

#define PTHREAD_CANCELED   ((void *) -1)

Definition at line 155 of file pthread.h.

#define pthread_cleanup_pop (   execute)    _pthread_cleanup_pop (&_buffer, (execute)); }

Definition at line 621 of file pthread.h.

#define pthread_cleanup_push (   routine,
  arg 
)
Value:
{ struct _pthread_cleanup_buffer _buffer;                            \
    _pthread_cleanup_push (&_buffer, (routine), (arg));

Definition at line 610 of file pthread.h.

#define PTHREAD_COND_INITIALIZER   {__LOCK_INITIALIZER, 0, "", 0}

Definition at line 44 of file pthread.h.

Definition at line 64 of file pthread.h.

Definition at line 62 of file pthread.h.

Definition at line 72 of file pthread.h.

Definition at line 70 of file pthread.h.

Definition at line 33 of file pthread.h.

#define PTHREAD_ONCE_INIT   0

Definition at line 120 of file pthread.h.

Definition at line 105 of file pthread.h.

Definition at line 107 of file pthread.h.

Definition at line 80 of file pthread.h.

Definition at line 78 of file pthread.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
PTHREAD_CREATE_JOINABLE 
PTHREAD_CREATE_JOINABLE 

Definition at line 59 of file pthread.h.

{
  PTHREAD_CREATE_JOINABLE,
#define PTHREAD_CREATE_JOINABLE    PTHREAD_CREATE_JOINABLE
  PTHREAD_CREATE_DETACHED
#define PTHREAD_CREATE_DETACHED    PTHREAD_CREATE_DETACHED
};
anonymous enum
Enumerator:
PTHREAD_INHERIT_SCHED 
PTHREAD_INHERIT_SCHED 

Definition at line 67 of file pthread.h.

{
  PTHREAD_INHERIT_SCHED,
#define PTHREAD_INHERIT_SCHED      PTHREAD_INHERIT_SCHED
  PTHREAD_EXPLICIT_SCHED
#define PTHREAD_EXPLICIT_SCHED     PTHREAD_EXPLICIT_SCHED
};
anonymous enum
Enumerator:
PTHREAD_SCOPE_SYSTEM 
PTHREAD_SCOPE_SYSTEM 

Definition at line 75 of file pthread.h.

{
  PTHREAD_SCOPE_SYSTEM,
#define PTHREAD_SCOPE_SYSTEM       PTHREAD_SCOPE_SYSTEM
  PTHREAD_SCOPE_PROCESS
#define PTHREAD_SCOPE_PROCESS      PTHREAD_SCOPE_PROCESS
};
anonymous enum
Enumerator:
PTHREAD_MUTEX_TIMED_NP 
PTHREAD_MUTEX_RECURSIVE_NP 
PTHREAD_MUTEX_ERRORCHECK_NP 
PTHREAD_MUTEX_ADAPTIVE_NP 

Definition at line 83 of file pthread.h.

{
  PTHREAD_MUTEX_TIMED_NP,
  PTHREAD_MUTEX_RECURSIVE_NP,
  PTHREAD_MUTEX_ERRORCHECK_NP,
  PTHREAD_MUTEX_ADAPTIVE_NP
#ifdef __USE_UNIX98
  ,
  PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
  PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
  PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
  PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
#endif
#ifdef __USE_GNU
  /* For compatibility.  */
  , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_ADAPTIVE_NP
#endif
};
anonymous enum
Enumerator:
PTHREAD_PROCESS_PRIVATE 
PTHREAD_PROCESS_PRIVATE 

Definition at line 102 of file pthread.h.

{
  PTHREAD_PROCESS_PRIVATE,
#define PTHREAD_PROCESS_PRIVATE    PTHREAD_PROCESS_PRIVATE
  PTHREAD_PROCESS_SHARED
#define PTHREAD_PROCESS_SHARED     PTHREAD_PROCESS_SHARED
};
anonymous enum
Enumerator:
PTHREAD_CANCEL_ENABLE 
PTHREAD_CANCEL_ENABLE 

Definition at line 141 of file pthread.h.

{
  PTHREAD_CANCEL_ENABLE,
#define PTHREAD_CANCEL_ENABLE      PTHREAD_CANCEL_ENABLE
  PTHREAD_CANCEL_DISABLE
#define PTHREAD_CANCEL_DISABLE     PTHREAD_CANCEL_DISABLE
};
anonymous enum
Enumerator:
PTHREAD_CANCEL_DEFERRED 
PTHREAD_CANCEL_DEFERRED 

Definition at line 148 of file pthread.h.

{
  PTHREAD_CANCEL_DEFERRED,
#define PTHREAD_CANCEL_DEFERRED    PTHREAD_CANCEL_DEFERRED
  PTHREAD_CANCEL_ASYNCHRONOUS
#define PTHREAD_CANCEL_ASYNCHRONOUS       PTHREAD_CANCEL_ASYNCHRONOUS
};

Function Documentation

void _pthread_cleanup_pop ( struct _pthread_cleanup_buffer __buffer,
int  __execute 
)

Definition at line 167 of file cancel.c.

{
  pthread_descr self = thread_self();
  if (execute) buffer->__routine(buffer->__arg);
  THREAD_SETMEM(self, p_cleanup, buffer->__prev);
}
void _pthread_cleanup_push ( struct _pthread_cleanup_buffer __buffer,
void(*)(void *)  __routine,
void *  __arg 
)

Definition at line 155 of file cancel.c.

{
  pthread_descr self = thread_self();
  buffer->__routine = routine;
  buffer->__arg = arg;
  buffer->__prev = THREAD_GETMEM(self, p_cleanup);
  if (buffer->__prev != NULL && FRAME_LEFT (buffer, buffer->__prev))
    buffer->__prev = NULL;
  THREAD_SETMEM(self, p_cleanup, buffer);
}
int pthread_atfork ( void(*)(void)  __prepare,
void(*)(void)  __parent,
void(*)(void)  __child 
)

Here is the caller graph for this function:

int pthread_attr_getdetachstate ( __const pthread_attr_t __attr,
int __detachstate 
)

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

int pthread_attr_setdetachstate ( pthread_attr_t __attr,
int  __detachstate 
)

Here is the caller graph for this function:

int pthread_attr_setinheritsched ( pthread_attr_t __attr,
int  __inherit 
)

Here is the caller graph for this function:

Here is the caller graph for this function:

int pthread_attr_setschedpolicy ( pthread_attr_t __attr,
int  __policy 
)

Here is the caller graph for this function:

int pthread_attr_setscope ( pthread_attr_t __attr,
int  __scope 
)

Here is the caller graph for this function:

int pthread_attr_setstackaddr ( pthread_attr_t __attr,
void *  __stackaddr 
)
int pthread_attr_setstacksize ( pthread_attr_t __attr,
size_t  __stacksize 
)

Here is the caller graph for this function:

int pthread_cancel ( pthread_t  __cancelthread)

Definition at line 89 of file cancel.c.

{
  pthread_handle handle = thread_handle(thread);
  int pid;
  int dorestart = 0;
  pthread_descr th;
  pthread_extricate_if *pextricate;
  int already_canceled;

  __pthread_lock(&handle->h_lock, NULL);
  if (invalid_handle(handle, thread)) {
    __pthread_unlock(&handle->h_lock);
    return ESRCH;
  }

  th = handle->h_descr;

  already_canceled = th->p_canceled;
  th->p_canceled = 1;

  if (th->p_cancelstate == PTHREAD_CANCEL_DISABLE || already_canceled) {
    __pthread_unlock(&handle->h_lock);
    return 0;
  }

  pextricate = th->p_extricate;
  pid = th->p_pid;

  /* If the thread has registered an extrication interface, then
     invoke the interface. If it returns 1, then we succeeded in
     dequeuing the thread from whatever waiting object it was enqueued
     with. In that case, it is our responsibility to wake it up.
     And also to set the p_woken_by_cancel flag so the woken thread
     can tell that it was woken by cancellation. */

  if (pextricate != NULL) {
    dorestart = pextricate->pu_extricate_func(pextricate->pu_object, th);
    th->p_woken_by_cancel = dorestart;
  }

  __pthread_unlock(&handle->h_lock);

  /* If the thread has suspended or is about to, then we unblock it by
     issuing a restart, instead of a cancel signal. Otherwise we send
     the cancel signal to unblock the thread from a cancellation point,
     or to initiate asynchronous cancellation. The restart is needed so
     we have proper accounting of restarts; suspend decrements the thread's
     resume count, and restart() increments it.  This also means that suspend's
     handling of the cancel signal is obsolete. */

  if (dorestart)
    restart(th);
  else
    kill(pid, __pthread_sig_cancel);

  return 0;
}

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

int pthread_condattr_setpshared ( pthread_condattr_t __attr,
int  __pshared 
)

Definition at line 331 of file condvar.c.

{
  if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
    return EINVAL;

  /* For now it is not possible to shared a conditional variable.  */
  if (pshared != PTHREAD_PROCESS_PRIVATE)
    return ENOSYS;

  return 0;
}
int pthread_create ( pthread_t *__restrict  __threadp,
__const pthread_attr_t *__restrict  __attr,
void *(*)(void *)  __start_routine,
void *__restrict  __arg 
)

Here is the caller graph for this function:

Definition at line 184 of file join.c.

{
  int terminated;
  struct pthread_request request;
  pthread_handle handle = thread_handle(thread_id);
  pthread_descr th;

  __pthread_lock(&handle->h_lock, NULL);
  if (nonexisting_handle(handle, thread_id)) {
    __pthread_unlock(&handle->h_lock);
    return ESRCH;
  }
  th = handle->h_descr;
  /* If already detached, error */
  if (th->p_detached) {
    __pthread_unlock(&handle->h_lock);
    return EINVAL;
  }
  /* If already joining, don't do anything. */
  if (th->p_joining != NULL) {
    __pthread_unlock(&handle->h_lock);
    return 0;
  }
  /* Mark as detached */
  th->p_detached = 1;
  terminated = th->p_terminated;
  __pthread_unlock(&handle->h_lock);
  /* If already terminated, notify thread manager to reclaim resources */
  if (terminated && __pthread_manager_request >= 0) {
    request.req_thread = thread_self();
    request.req_kind = REQ_FREE;
    request.req_args.free.thread_id = thread_id;
    TEMP_FAILURE_RETRY(write_not_cancel(__pthread_manager_request,
                                   (char *) &request, sizeof(request)));
  }
  return 0;
}
int pthread_equal ( pthread_t  __thread1,
pthread_t  __thread2 
)

Here is the caller graph for this function:

void pthread_exit ( void *  __retval)

Here is the caller graph for this function:

int pthread_getschedparam ( pthread_t  __target_thread,
int *__restrict  __policy,
struct sched_param *__restrict  __param 
)

Here is the caller graph for this function:

Here is the caller graph for this function:

int pthread_join ( pthread_t  __th,
void **  __thread_return 
)

Definition at line 114 of file join.c.

{
  volatile pthread_descr self = thread_self();
  struct pthread_request request;
  pthread_handle handle = thread_handle(thread_id);
  pthread_descr th;
  pthread_extricate_if extr;
  int already_canceled = 0;

  /* Set up extrication interface */
  extr.pu_object = handle;
  extr.pu_extricate_func = join_extricate_func;

  __pthread_lock(&handle->h_lock, self);
  if (nonexisting_handle(handle, thread_id)) {
    __pthread_unlock(&handle->h_lock);
    return ESRCH;
  }
  th = handle->h_descr;
  if (th == self) {
    __pthread_unlock(&handle->h_lock);
    return EDEADLK;
  }
  /* If detached or already joined, error */
  if (th->p_detached || th->p_joining != NULL) {
    __pthread_unlock(&handle->h_lock);
    return EINVAL;
  }
  /* If not terminated yet, suspend ourselves. */
  if (! th->p_terminated) {
    /* Register extrication interface */
    __pthread_set_own_extricate_if(self, &extr);
    if (!(THREAD_GETMEM(self, p_canceled)
       && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE))
      th->p_joining = self;
    else
      already_canceled = 1;
    __pthread_unlock(&handle->h_lock);

    if (already_canceled) {
      __pthread_set_own_extricate_if(self, 0);
      __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
    }

    suspend(self);
    /* Deregister extrication interface */
    __pthread_set_own_extricate_if(self, 0);

    /* This is a cancellation point */
    if (THREAD_GETMEM(self, p_woken_by_cancel)
       && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
      THREAD_SETMEM(self, p_woken_by_cancel, 0);
      __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
    }
    __pthread_lock(&handle->h_lock, self);
  }
  /* Get return value */
  if (thread_return != NULL) *thread_return = th->p_retval;
  __pthread_unlock(&handle->h_lock);
  /* Send notification to thread manager */
  if (__pthread_manager_request >= 0) {
    request.req_thread = self;
    request.req_kind = REQ_FREE;
    request.req_args.free.thread_id = thread_id;
    TEMP_FAILURE_RETRY(write_not_cancel(__pthread_manager_request,
                                   (char *) &request, sizeof(request)));
  }
  return 0;
}
int pthread_key_create ( pthread_key_t __key,
void(*)(void *)  __destr_function 
)

Here is the caller graph for this function:

Definition at line 91 of file specific.c.

{
  pthread_descr self = thread_self();

  pthread_mutex_lock(&pthread_keys_mutex);
  if (key >= PTHREAD_KEYS_MAX || !pthread_keys[key].in_use) {
    pthread_mutex_unlock(&pthread_keys_mutex);
    return EINVAL;
  }
  pthread_keys[key].in_use = 0;
  pthread_keys[key].destr = NULL;

  /* Set the value of the key to NULL in all running threads, so
     that if the key is reallocated later by pthread_key_create, its
     associated values will be NULL in all threads.

     If no threads have been created yet, or if we are exiting, clear
     it just in the current thread.  */

  struct pthread_key_delete_helper_args args;
  args.idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE;
  args.idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE;
  if (__pthread_manager_request != -1
      && !(__builtin_expect (__pthread_exit_requested, 0)))
    {
      struct pthread_request request;

      args.self = 0;

      request.req_thread = self;
      request.req_kind = REQ_FOR_EACH_THREAD;
      request.req_args.for_each.arg = &args;
      request.req_args.for_each.fn = pthread_key_delete_helper;

      TEMP_FAILURE_RETRY(write_not_cancel(__pthread_manager_request,
                                     (char *) &request, sizeof(request)));
      suspend(self);
    }
  else
    {
      if (self->p_specific[args.idx1st] != NULL)
       self->p_specific[args.idx1st][args.idx2nd] = NULL;
    }

  pthread_mutex_unlock(&pthread_keys_mutex);
  return 0;
}

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Definition at line 25 of file pthread_mutexattr_setpshared.c.

{
  struct pthread_mutexattr *iattr;

  if (pshared != PTHREAD_PROCESS_PRIVATE
      && __builtin_expect (pshared != PTHREAD_PROCESS_SHARED, 0))
    return EINVAL;

  iattr = (struct pthread_mutexattr *) attr;

  if (pshared == PTHREAD_PROCESS_PRIVATE)
    iattr->mutexkind &= ~PTHREAD_MUTEXATTR_FLAG_PSHARED;
  else
    iattr->mutexkind |= PTHREAD_MUTEXATTR_FLAG_PSHARED;

  return 0;
}

Here is the caller graph for this function:

int pthread_once ( pthread_once_t __once_control,
void(*)(void)  __init_routine 
)

Here is the caller graph for this function:

pthread_t pthread_self ( void  )

Here is the caller graph for this function:

int pthread_setcancelstate ( int  __state,
int __oldstate 
)

Here is the caller graph for this function:

int pthread_setcanceltype ( int  __type,
int __oldtype 
)

Here is the caller graph for this function:

int pthread_setschedparam ( pthread_t  __target_thread,
int  __policy,
__const struct sched_param __param 
)

Here is the caller graph for this function:

int pthread_setspecific ( pthread_key_t  __key,
__const void *  __pointer 
)

Here is the caller graph for this function:

void pthread_testcancel ( void  )