Blame sysdeps/nptl/libc-lockP.h

Packit 6c4009
/* Private libc-internal interface for mutex locks.  NPTL version.
Packit 6c4009
   Copyright (C) 1996-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public License as
Packit 6c4009
   published by the Free Software Foundation; either version 2.1 of the
Packit 6c4009
   License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; see the file COPYING.LIB.  If
Packit 6c4009
   not, see <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _LIBC_LOCKP_H
Packit 6c4009
#define _LIBC_LOCKP_H 1
Packit 6c4009
Packit 6c4009
#include <pthread.h>
Packit 6c4009
#define __need_NULL
Packit 6c4009
#include <stddef.h>
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Fortunately Linux now has a mean to do locking which is realtime
Packit 6c4009
   safe without the aid of the thread library.  We also need no fancy
Packit 6c4009
   options like error checking mutexes etc.  We only need simple
Packit 6c4009
   locks, maybe recursive.  This can be easily and cheaply implemented
Packit 6c4009
   using futexes.  We will use them everywhere except in ld.so since
Packit 6c4009
   ld.so might be used on old kernels with a different libc.so.  */
Packit 6c4009
#include <lowlevellock.h>
Packit 6c4009
#include <tls.h>
Packit 6c4009
#include <pthread-functions.h>
Packit 6c4009
Packit 6c4009
#if IS_IN (libpthread)
Packit 6c4009
/* This gets us the declarations of the __pthread_* internal names,
Packit 6c4009
   and hidden_proto for them.  */
Packit 6c4009
# include <nptl/pthreadP.h>
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Mutex type.  */
Packit 6c4009
#if !IS_IN (libc) && !IS_IN (libpthread)
Packit 6c4009
typedef pthread_mutex_t __libc_lock_t;
Packit 6c4009
#else
Packit 6c4009
typedef int __libc_lock_t;
Packit 6c4009
#endif
Packit 6c4009
typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
Packit 6c4009
typedef pthread_rwlock_t __libc_rwlock_t;
Packit 6c4009
Packit 6c4009
/* Type for key to thread-specific data.  */
Packit 6c4009
typedef pthread_key_t __libc_key_t;
Packit 6c4009
Packit 6c4009
/* Define a lock variable NAME with storage class CLASS.  The lock must be
Packit 6c4009
   initialized with __libc_lock_init before it can be used (or define it
Packit 6c4009
   with __libc_lock_define_initialized, below).  Use `extern' for CLASS to
Packit 6c4009
   declare a lock defined in another module.  In public structure
Packit 6c4009
   definitions you must use a pointer to the lock structure (i.e., NAME
Packit 6c4009
   begins with a `*'), because its storage size will not be known outside
Packit 6c4009
   of libc.  */
Packit 6c4009
#define __libc_lock_define(CLASS,NAME) \
Packit 6c4009
  CLASS __libc_lock_t NAME;
Packit 6c4009
#define __libc_rwlock_define(CLASS,NAME) \
Packit 6c4009
  CLASS __libc_rwlock_t NAME;
Packit 6c4009
#define __rtld_lock_define_recursive(CLASS,NAME) \
Packit 6c4009
  CLASS __rtld_lock_recursive_t NAME;
Packit 6c4009
Packit 6c4009
/* Define an initialized lock variable NAME with storage class CLASS.
Packit 6c4009
Packit 6c4009
   For the C library we take a deeper look at the initializer.  For
Packit 6c4009
   this implementation all fields are initialized to zero.  Therefore
Packit 6c4009
   we don't initialize the variable which allows putting it into the
Packit 6c4009
   BSS section.  (Except on PA-RISC and other odd architectures, where
Packit 6c4009
   initialized locks must be set to one due to the lack of normal
Packit 6c4009
   atomic operations.) */
Packit 6c4009
Packit 6c4009
#define _LIBC_LOCK_INITIALIZER LLL_LOCK_INITIALIZER
Packit 6c4009
#if IS_IN (libc) || IS_IN (libpthread)
Packit 6c4009
# if LLL_LOCK_INITIALIZER == 0
Packit 6c4009
#  define __libc_lock_define_initialized(CLASS,NAME) \
Packit 6c4009
  CLASS __libc_lock_t NAME;
Packit 6c4009
# else
Packit 6c4009
#  define __libc_lock_define_initialized(CLASS,NAME) \
Packit 6c4009
  CLASS __libc_lock_t NAME = LLL_LOCK_INITIALIZER;
Packit 6c4009
# endif
Packit 6c4009
#else
Packit 6c4009
# define __libc_lock_define_initialized(CLASS,NAME) \
Packit 6c4009
  CLASS __libc_lock_t NAME;
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#define __libc_rwlock_define_initialized(CLASS,NAME) \
Packit 6c4009
  CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER;
Packit 6c4009
Packit 6c4009
#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \
Packit 6c4009
  CLASS __rtld_lock_recursive_t NAME = _RTLD_LOCK_RECURSIVE_INITIALIZER;
Packit 6c4009
#define _RTLD_LOCK_RECURSIVE_INITIALIZER \
Packit 6c4009
  {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
Packit 6c4009
Packit 6c4009
#define __rtld_lock_initialize(NAME) \
Packit 6c4009
  (void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER)
Packit 6c4009
Packit 6c4009
/* If we check for a weakly referenced symbol and then perform a
Packit 6c4009
   normal jump to it te code generated for some platforms in case of
Packit 6c4009
   PIC is unnecessarily slow.  What would happen is that the function
Packit 6c4009
   is first referenced as data and then it is called indirectly
Packit 6c4009
   through the PLT.  We can make this a direct jump.  */
Packit 6c4009
#ifdef __PIC__
Packit 6c4009
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
Packit 6c4009
  (__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \
Packit 6c4009
		    _fn != NULL ? (*_fn) ARGS : ELSE; }))
Packit 6c4009
#else
Packit 6c4009
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
Packit 6c4009
  (FUNC != NULL ? FUNC ARGS : ELSE)
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Call thread functions through the function pointer table.  */
Packit 6c4009
#if defined SHARED && IS_IN (libc)
Packit 6c4009
# define PTFAVAIL(NAME) __libc_pthread_functions_init
Packit 6c4009
# define __libc_ptf_call(FUNC, ARGS, ELSE) \
Packit 6c4009
  (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE)
Packit 6c4009
# define __libc_ptf_call_always(FUNC, ARGS) \
Packit 6c4009
  PTHFCT_CALL (ptr_##FUNC, ARGS)
Packit 6c4009
#elif IS_IN (libpthread)
Packit 6c4009
# define PTFAVAIL(NAME) 1
Packit 6c4009
# define __libc_ptf_call(FUNC, ARGS, ELSE) \
Packit 6c4009
  FUNC ARGS
Packit 6c4009
# define __libc_ptf_call_always(FUNC, ARGS) \
Packit 6c4009
  FUNC ARGS
Packit 6c4009
#else
Packit 6c4009
# define PTFAVAIL(NAME) (NAME != NULL)
Packit 6c4009
# define __libc_ptf_call(FUNC, ARGS, ELSE) \
Packit 6c4009
  __libc_maybe_call (FUNC, ARGS, ELSE)
Packit 6c4009
# define __libc_ptf_call_always(FUNC, ARGS) \
Packit 6c4009
  FUNC ARGS
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Initialize the named lock variable, leaving it in a consistent, unlocked
Packit 6c4009
   state.  */
Packit 6c4009
#if IS_IN (libc) || IS_IN (libpthread)
Packit 6c4009
# define __libc_lock_init(NAME) \
Packit 6c4009
  ((void) ((NAME) = LLL_LOCK_INITIALIZER))
Packit 6c4009
#else
Packit 6c4009
# define __libc_lock_init(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_init, (&(NAME), NULL), 0)
Packit 6c4009
#endif
Packit 6c4009
#if defined SHARED && IS_IN (libc)
Packit 6c4009
/* ((NAME) = (__libc_rwlock_t) PTHREAD_RWLOCK_INITIALIZER) is inefficient.  */
Packit 6c4009
# define __libc_rwlock_init(NAME) \
Packit 6c4009
  ((void) __builtin_memset (&(NAME), '\0', sizeof (NAME)))
Packit 6c4009
#else
Packit 6c4009
# define __libc_rwlock_init(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0)
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Finalize the named lock variable, which must be locked.  It cannot be
Packit 6c4009
   used again until __libc_lock_init is called again on it.  This must be
Packit 6c4009
   called on a lock variable before the containing storage is reused.  */
Packit 6c4009
#if IS_IN (libc) || IS_IN (libpthread)
Packit 6c4009
# define __libc_lock_fini(NAME) ((void) 0)
Packit 6c4009
#else
Packit 6c4009
# define __libc_lock_fini(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_destroy, (&(NAME)), 0)
Packit 6c4009
#endif
Packit 6c4009
#if defined SHARED && IS_IN (libc)
Packit 6c4009
# define __libc_rwlock_fini(NAME) ((void) 0)
Packit 6c4009
#else
Packit 6c4009
# define __libc_rwlock_fini(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0)
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Lock the named lock variable.  */
Packit 6c4009
#if IS_IN (libc) || IS_IN (libpthread)
Packit 6c4009
# ifndef __libc_lock_lock
Packit 6c4009
#  define __libc_lock_lock(NAME) \
Packit 6c4009
  ({ lll_lock (NAME, LLL_PRIVATE); 0; })
Packit 6c4009
# endif
Packit 6c4009
#else
Packit 6c4009
# undef __libc_lock_lock
Packit 6c4009
# define __libc_lock_lock(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_lock, (&(NAME)), 0)
Packit 6c4009
#endif
Packit 6c4009
#define __libc_rwlock_rdlock(NAME) \
Packit 6c4009
  __libc_ptf_call (__pthread_rwlock_rdlock, (&(NAME)), 0)
Packit 6c4009
#define __libc_rwlock_wrlock(NAME) \
Packit 6c4009
  __libc_ptf_call (__pthread_rwlock_wrlock, (&(NAME)), 0)
Packit 6c4009
Packit 6c4009
/* Try to lock the named lock variable.  */
Packit 6c4009
#if IS_IN (libc) || IS_IN (libpthread)
Packit 6c4009
# ifndef __libc_lock_trylock
Packit 6c4009
#  define __libc_lock_trylock(NAME) \
Packit 6c4009
  lll_trylock (NAME)
Packit 6c4009
# endif
Packit 6c4009
#else
Packit 6c4009
# undef __libc_lock_trylock
Packit 6c4009
# define __libc_lock_trylock(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0)
Packit 6c4009
#endif
Packit 6c4009
#define __libc_rwlock_tryrdlock(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_rwlock_tryrdlock, (&(NAME)), 0)
Packit 6c4009
#define __libc_rwlock_trywrlock(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_rwlock_trywrlock, (&(NAME)), 0)
Packit 6c4009
Packit 6c4009
#define __rtld_lock_trylock_recursive(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0)
Packit 6c4009
Packit 6c4009
/* Unlock the named lock variable.  */
Packit 6c4009
#if IS_IN (libc) || IS_IN (libpthread)
Packit 6c4009
# define __libc_lock_unlock(NAME) \
Packit 6c4009
  lll_unlock (NAME, LLL_PRIVATE)
Packit 6c4009
#else
Packit 6c4009
# define __libc_lock_unlock(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0)
Packit 6c4009
#endif
Packit 6c4009
#define __libc_rwlock_unlock(NAME) \
Packit 6c4009
  __libc_ptf_call (__pthread_rwlock_unlock, (&(NAME)), 0)
Packit 6c4009
Packit 6c4009
#ifdef SHARED
Packit 6c4009
# define __rtld_lock_default_lock_recursive(lock) \
Packit 6c4009
  ++((pthread_mutex_t *)(lock))->__data.__count;
Packit 6c4009
Packit 6c4009
# define __rtld_lock_default_unlock_recursive(lock) \
Packit 6c4009
  --((pthread_mutex_t *)(lock))->__data.__count;
Packit 6c4009
Packit 6c4009
# define __rtld_lock_lock_recursive(NAME) \
Packit 6c4009
  GL(dl_rtld_lock_recursive) (&(NAME).mutex)
Packit 6c4009
Packit 6c4009
# define __rtld_lock_unlock_recursive(NAME) \
Packit 6c4009
  GL(dl_rtld_unlock_recursive) (&(NAME).mutex)
Packit 6c4009
#else
Packit 6c4009
# define __rtld_lock_lock_recursive(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0)
Packit 6c4009
Packit 6c4009
# define __rtld_lock_unlock_recursive(NAME) \
Packit 6c4009
  __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0)
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Define once control variable.  */
Packit 6c4009
#if PTHREAD_ONCE_INIT == 0
Packit 6c4009
/* Special case for static variables where we can avoid the initialization
Packit 6c4009
   if it is zero.  */
Packit 6c4009
# define __libc_once_define(CLASS, NAME) \
Packit 6c4009
  CLASS pthread_once_t NAME
Packit 6c4009
#else
Packit 6c4009
# define __libc_once_define(CLASS, NAME) \
Packit 6c4009
  CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Call handler iff the first call.  */
Packit 6c4009
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
Packit 6c4009
  do {									      \
Packit 6c4009
    if (PTFAVAIL (__pthread_once))					      \
Packit 6c4009
      __libc_ptf_call_always (__pthread_once, (&(ONCE_CONTROL),		      \
Packit 6c4009
					       INIT_FUNCTION));		      \
Packit 6c4009
    else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) {			      \
Packit 6c4009
      INIT_FUNCTION ();							      \
Packit 6c4009
      (ONCE_CONTROL) |= 2;						      \
Packit 6c4009
    }									      \
Packit 6c4009
  } while (0)
Packit 6c4009
Packit 6c4009
/* Get once control variable.  */
Packit 6c4009
#define __libc_once_get(ONCE_CONTROL)	((ONCE_CONTROL) != PTHREAD_ONCE_INIT)
Packit 6c4009
Packit 6c4009
/* Note that for I/O cleanup handling we are using the old-style
Packit 6c4009
   cancel handling.  It does not have to be integrated with C++ snce
Packit 6c4009
   no C++ code is called in the middle.  The old-style handling is
Packit 6c4009
   faster and the support is not going away.  */
Packit 6c4009
extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
Packit 6c4009
				   void (*routine) (void *), void *arg);
Packit 6c4009
extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer,
Packit 6c4009
				  int execute);
Packit 6c4009
extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer,
Packit 6c4009
					 void (*routine) (void *), void *arg);
Packit 6c4009
extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer,
Packit 6c4009
					  int execute);
Packit 6c4009
Packit 6c4009
/* Sometimes we have to exit the block in the middle.  */
Packit 6c4009
#define __libc_cleanup_end(DOIT) \
Packit 6c4009
    if (_avail) {							      \
Packit 6c4009
      __libc_ptf_call_always (_pthread_cleanup_pop_restore, (&_buffer, DOIT));\
Packit 6c4009
    } else if (DOIT)							      \
Packit 6c4009
      _buffer.__routine (_buffer.__arg)
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Normal cleanup handling, based on C cleanup attribute.  */
Packit 6c4009
__extern_inline void
Packit 6c4009
__libc_cleanup_routine (struct __pthread_cleanup_frame *f)
Packit 6c4009
{
Packit 6c4009
  if (f->__do_it)
Packit 6c4009
    f->__cancel_routine (f->__cancel_arg);
Packit 6c4009
}
Packit 6c4009
Packit 6c4009
#define __libc_cleanup_push(fct, arg) \
Packit 6c4009
  do {									      \
Packit 6c4009
    struct __pthread_cleanup_frame __clframe				      \
Packit 6c4009
      __attribute__ ((__cleanup__ (__libc_cleanup_routine)))		      \
Packit 6c4009
      = { .__cancel_routine = (fct), .__cancel_arg = (arg),		      \
Packit 6c4009
	  .__do_it = 1 };
Packit 6c4009
Packit 6c4009
#define __libc_cleanup_pop(execute) \
Packit 6c4009
    __clframe.__do_it = (execute);					      \
Packit 6c4009
  } while (0)
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Create thread-specific key.  */
Packit 6c4009
#define __libc_key_create(KEY, DESTRUCTOR) \
Packit 6c4009
  __libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1)
Packit 6c4009
Packit 6c4009
/* Get thread-specific data.  */
Packit 6c4009
#define __libc_getspecific(KEY) \
Packit 6c4009
  __libc_ptf_call (__pthread_getspecific, (KEY), NULL)
Packit 6c4009
Packit 6c4009
/* Set thread-specific data.  */
Packit 6c4009
#define __libc_setspecific(KEY, VALUE) \
Packit 6c4009
  __libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0)
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Register handlers to execute before and after `fork'.  Note that the
Packit 6c4009
   last parameter is NULL.  The handlers registered by the libc are
Packit 6c4009
   never removed so this is OK.  */
Packit 6c4009
extern int __register_atfork (void (*__prepare) (void),
Packit 6c4009
			      void (*__parent) (void),
Packit 6c4009
			      void (*__child) (void),
Packit 6c4009
			      void *__dso_handle);
Packit 6c4009
Packit 6c4009
/* Functions that are used by this file and are internal to the GNU C
Packit 6c4009
   library.  */
Packit 6c4009
Packit 6c4009
extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
Packit 6c4009
				 const pthread_mutexattr_t *__mutex_attr);
Packit 6c4009
Packit 6c4009
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
Packit 6c4009
Packit 6c4009
extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
Packit 6c4009
Packit 6c4009
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
Packit 6c4009
Packit 6c4009
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
Packit 6c4009
Packit 6c4009
extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr);
Packit 6c4009
Packit 6c4009
extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
Packit 6c4009
Packit 6c4009
extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
Packit 6c4009
					int __kind);
Packit 6c4009
Packit 6c4009
extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
Packit 6c4009
				  const pthread_rwlockattr_t *__attr);
Packit 6c4009
Packit 6c4009
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
Packit 6c4009
Packit 6c4009
extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
Packit 6c4009
Packit 6c4009
extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
Packit 6c4009
Packit 6c4009
extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
Packit 6c4009
Packit 6c4009
extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
Packit 6c4009
Packit 6c4009
extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
Packit 6c4009
Packit 6c4009
extern int __pthread_key_create (pthread_key_t *__key,
Packit 6c4009
				 void (*__destr_function) (void *));
Packit 6c4009
Packit 6c4009
extern int __pthread_setspecific (pthread_key_t __key,
Packit 6c4009
				  const void *__pointer);
Packit 6c4009
Packit 6c4009
extern void *__pthread_getspecific (pthread_key_t __key);
Packit 6c4009
Packit 6c4009
extern int __pthread_once (pthread_once_t *__once_control,
Packit 6c4009
			   void (*__init_routine) (void));
Packit 6c4009
Packit 6c4009
extern int __pthread_atfork (void (*__prepare) (void),
Packit 6c4009
			     void (*__parent) (void),
Packit 6c4009
			     void (*__child) (void));
Packit 6c4009
Packit 6c4009
extern int __pthread_setcancelstate (int state, int *oldstate);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Make the pthread functions weak so that we can elide them from
Packit 6c4009
   single-threaded processes.  */
Packit 6c4009
#ifndef __NO_WEAK_PTHREAD_ALIASES
Packit 6c4009
# ifdef weak_extern
Packit 6c4009
weak_extern (__pthread_mutex_init)
Packit 6c4009
weak_extern (__pthread_mutex_destroy)
Packit 6c4009
weak_extern (__pthread_mutex_lock)
Packit 6c4009
weak_extern (__pthread_mutex_trylock)
Packit 6c4009
weak_extern (__pthread_mutex_unlock)
Packit 6c4009
weak_extern (__pthread_mutexattr_init)
Packit 6c4009
weak_extern (__pthread_mutexattr_destroy)
Packit 6c4009
weak_extern (__pthread_mutexattr_settype)
Packit 6c4009
weak_extern (__pthread_rwlock_init)
Packit 6c4009
weak_extern (__pthread_rwlock_destroy)
Packit 6c4009
weak_extern (__pthread_rwlock_rdlock)
Packit 6c4009
weak_extern (__pthread_rwlock_tryrdlock)
Packit 6c4009
weak_extern (__pthread_rwlock_wrlock)
Packit 6c4009
weak_extern (__pthread_rwlock_trywrlock)
Packit 6c4009
weak_extern (__pthread_rwlock_unlock)
Packit 6c4009
weak_extern (__pthread_key_create)
Packit 6c4009
weak_extern (__pthread_setspecific)
Packit 6c4009
weak_extern (__pthread_getspecific)
Packit 6c4009
weak_extern (__pthread_once)
Packit 6c4009
weak_extern (__pthread_initialize)
Packit 6c4009
weak_extern (__pthread_atfork)
Packit 6c4009
weak_extern (__pthread_setcancelstate)
Packit 6c4009
weak_extern (_pthread_cleanup_push_defer)
Packit 6c4009
weak_extern (_pthread_cleanup_pop_restore)
Packit 6c4009
# else
Packit 6c4009
#  pragma weak __pthread_mutex_init
Packit 6c4009
#  pragma weak __pthread_mutex_destroy
Packit 6c4009
#  pragma weak __pthread_mutex_lock
Packit 6c4009
#  pragma weak __pthread_mutex_trylock
Packit 6c4009
#  pragma weak __pthread_mutex_unlock
Packit 6c4009
#  pragma weak __pthread_mutexattr_init
Packit 6c4009
#  pragma weak __pthread_mutexattr_destroy
Packit 6c4009
#  pragma weak __pthread_mutexattr_settype
Packit 6c4009
#  pragma weak __pthread_rwlock_destroy
Packit 6c4009
#  pragma weak __pthread_rwlock_rdlock
Packit 6c4009
#  pragma weak __pthread_rwlock_tryrdlock
Packit 6c4009
#  pragma weak __pthread_rwlock_wrlock
Packit 6c4009
#  pragma weak __pthread_rwlock_trywrlock
Packit 6c4009
#  pragma weak __pthread_rwlock_unlock
Packit 6c4009
#  pragma weak __pthread_key_create
Packit 6c4009
#  pragma weak __pthread_setspecific
Packit 6c4009
#  pragma weak __pthread_getspecific
Packit 6c4009
#  pragma weak __pthread_once
Packit 6c4009
#  pragma weak __pthread_initialize
Packit 6c4009
#  pragma weak __pthread_atfork
Packit 6c4009
#  pragma weak __pthread_setcancelstate
Packit 6c4009
#  pragma weak _pthread_cleanup_push_defer
Packit 6c4009
#  pragma weak _pthread_cleanup_pop_restore
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#endif	/* libc-lockP.h */