extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict __abstime)
/* Functions for handling condition variable attributes. */
/* Initialize condition variable attribute ATTR. */
extern int pthread_condattr_init (pthread_condattr_t *__attr)
/* Destroy condition variable attribute ATTR. */
extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
/* Get the process-shared flag of the condition variable attribute ATTR. */
extern int pthread_condattr_getpshared (const pthread_condattr_t *
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
/* Set the process-shared flag of the condition variable attribute ATTR. */
extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
int __pshared) __THROW __nonnull ((1));
/* Get the clock selected for the condition variable attribute ATTR. */
extern int pthread_condattr_getclock (const pthread_condattr_t *
__clockid_t *__restrict __clock_id)
__THROW __nonnull ((1, 2));
/* Set the clock selected for the condition variable attribute ATTR. */
extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
/* Functions to handle spinlocks. */
/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can
be shared between different processes. */
extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
/* Destroy the spinlock LOCK. */
extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
/* Wait until spinlock LOCK is retrieved. */
extern int pthread_spin_lock (pthread_spinlock_t *__lock)
__THROWNL __nonnull ((1));
/* Try to lock spinlock LOCK. */
extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
__THROWNL __nonnull ((1));
/* Release spinlock LOCK. */
extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
__THROWNL __nonnull ((1));
/* Functions to handle barriers. */
/* Initialize BARRIER with the attributes in ATTR. The barrier is
opened when COUNT waiters arrived. */
extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
const pthread_barrierattr_t *__restrict
__attr, unsigned int __count)
/* Destroy a previously dynamically initialized barrier BARRIER. */
extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
/* Wait on barrier BARRIER. */
extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
__THROWNL __nonnull ((1));
/* Initialize barrier attribute ATTR. */
extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
/* Destroy previously dynamically initialized barrier attribute ATTR. */
extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
/* Get the process-shared flag of the barrier attribute ATTR. */
extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
/* Set the process-shared flag of the barrier attribute ATTR. */
extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
/* Functions for handling thread-specific data. */
/* Create a key value identifying a location in the thread-specific
data area. Each thread maintains a distinct thread-specific data
area. DESTR_FUNCTION, if non-NULL, is called with the value
associated to that key when the key is destroyed.
DESTR_FUNCTION is not called if the value associated is NULL when
extern int pthread_key_create (pthread_key_t *__key,
void (*__destr_function) (void *))
extern int pthread_key_delete (pthread_key_t __key) __THROW;
/* Return current value of the thread-specific data slot identified by KEY. */
extern void *pthread_getspecific (pthread_key_t __key) __THROW;
/* Store POINTER in the thread-specific data slot identified by KEY. */
extern int pthread_setspecific (pthread_key_t __key,
const void *__pointer) __THROW ;
/* Get ID of CPU-time clock for thread THREAD_ID. */
extern int pthread_getcpuclockid (pthread_t __thread_id,
/* Install handlers to be called when a new process is created with FORK.
The PREPARE handler is called in the parent process just before performing
FORK. The PARENT handler is called in the parent process just after FORK.
The CHILD handler is called in the child process. Each of the three
handlers can be NULL, meaning that no handler needs to be called at that
PTHREAD_ATFORK can be called several times, in which case the PREPARE
handlers are called in LIFO order (last added with PTHREAD_ATFORK,
first called before FORK), and the PARENT and CHILD handlers are called
in FIFO (first added, first called). */
extern int pthread_atfork (void (*__prepare) (void),
void (*__child) (void)) __THROW;
#ifdef __USE_EXTERN_INLINES
__NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2))
return __thread1 == __thread2;