#include <signal.h>
#include <stdlib.h>
-#include <shlib-compat.h>
#include <atomic.h>
#include <sysdep.h>
#include <tls.h>
#include <fork.h>
#include <version.h>
-#include <shlib-compat.h>
#include <smp.h>
#include <lowlevellock.h>
#include <string.h>
#include <unistd.h>
#include "pthreadP.h"
-#include <shlib-compat.h>
int
__pthread_attr_destroy (attr)
assert (sizeof (*attr) >= sizeof (struct pthread_attr));
iattr = (struct pthread_attr *) attr;
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
- /* In old struct pthread_attr, neither next nor cpuset are
- present. */
- if (__builtin_expect ((iattr->flags & ATTR_FLAG_OLDATTR), 0) == 0)
-#endif
/* The affinity CPU set might be allocated dynamically. */
free (iattr->cpuset);
#include <unistd.h>
#include "pthreadP.h"
-#include <shlib-compat.h>
-
struct pthread_attr *__attr_list;
lll_lock_t __attr_list_lock = LLL_LOCK_INITIALIZER;
}
versioned_symbol (libpthread, __pthread_attr_init_2_1, pthread_attr_init,
GLIBC_2_1);
-
-
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-int
-__pthread_attr_init_2_0 (attr)
- pthread_attr_t *attr;
-{
- /* This code is specific to the old LinuxThread code which has a too
- small pthread_attr_t definition. The struct looked like
- this: */
- struct old_attr
- {
- int detachstate;
- int schedpolicy;
- struct sched_param schedparam;
- int inheritsched;
- int scope;
- };
- struct pthread_attr *iattr;
-
- /* Many elements are initialized to zero so let us do it all at
- once. This also takes care of clearing the bytes which are not
- internally used. */
- memset (attr, '\0', sizeof (struct old_attr));
-
- iattr = (struct pthread_attr *) attr;
- iattr->flags |= ATTR_FLAG_OLDATTR;
-
- /* We cannot enqueue the attribute because that member is not in the
- old attribute structure. */
- return 0;
-}
-compat_symbol (libpthread, __pthread_attr_init_2_0, pthread_attr_init,
- GLIBC_2_0);
-#endif
return 0;
}
-#if PTHREAD_STACK_MIN == 16384
strong_alias (__pthread_attr_setstack, pthread_attr_setstack)
-#else
-# include <shlib-compat.h>
-versioned_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack,
- GLIBC_2_3_3);
-
-# if SHLIB_COMPAT(libpthread, GLIBC_2_2, GLIBC_2_3_3)
-
-int
-__old_pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,
- size_t stacksize)
-{
- struct pthread_attr *iattr;
-
- assert (sizeof (*attr) >= sizeof (struct pthread_attr));
- iattr = (struct pthread_attr *) attr;
-
- /* Catch invalid sizes. */
- if (stacksize < 16384)
- return EINVAL;
-
-# ifdef EXTRA_PARAM_CHECKS
- EXTRA_PARAM_CHECKS;
-# endif
-
- iattr->stacksize = stacksize;
- iattr->stackaddr = (char *) stackaddr + stacksize;
- iattr->flags |= ATTR_FLAG_STACKADDR;
-
- return 0;
-}
-
-compat_symbol (libpthread, __old_pthread_attr_setstack, pthread_attr_setstack,
- GLIBC_2_2);
-# endif
-
-#endif
return 0;
}
-#if PTHREAD_STACK_MIN == 16384
strong_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize)
-#else
-# include <shlib-compat.h>
-versioned_symbol (libpthread, __pthread_attr_setstacksize,
- pthread_attr_setstacksize, GLIBC_2_3_3);
-
-# if SHLIB_COMPAT(libpthread, GLIBC_2_1, GLIBC_2_3_3)
-
-int
-__old_pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize)
-{
- struct pthread_attr *iattr;
-
- assert (sizeof (*attr) >= sizeof (struct pthread_attr));
- iattr = (struct pthread_attr *) attr;
-
- /* Catch invalid sizes. */
- if (stacksize < 16384)
- return EINVAL;
-
- iattr->stacksize = stacksize;
-
- return 0;
-}
-
-compat_symbol (libpthread, __old_pthread_attr_setstacksize,
- pthread_attr_setstacksize, GLIBC_2_1);
-# endif
-
-#endif
02111-1307 USA. */
#include <errno.h>
-#include <shlib-compat.h>
#include "pthreadP.h"
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <shlib-compat.h>
#include "pthreadP.h"
#include <libc-internal.h>
#include <resolv.h>
-#include <shlib-compat.h>
-
/* Local function to start thread and handle cleanup. */
static int start_thread (void *arg);
02111-1307 USA. */
#include <semaphore.h>
-#include <shlib-compat.h>
#include "semaphoreP.h"
return 0;
}
versioned_symbol (libpthread, __new_sem_destroy, sem_destroy, GLIBC_2_1);
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-strong_alias (__new_sem_destroy, __old_sem_destroy)
-compat_symbol (libpthread, __old_sem_destroy, sem_destroy, GLIBC_2_0);
-#endif
02111-1307 USA. */
#include <semaphore.h>
-#include <shlib-compat.h>
#include "semaphoreP.h"
return 0;
}
versioned_symbol (libpthread, __new_sem_getvalue, sem_getvalue, GLIBC_2_1);
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-strong_alias (__new_sem_getvalue, __old_sem_getvalue)
-compat_symbol (libpthread, __old_sem_getvalue, sem_getvalue, GLIBC_2_0);
-#endif
#include <errno.h>
#include <semaphore.h>
#include <lowlevellock.h>
-#include <shlib-compat.h>
#include "semaphoreP.h"
return 0;
}
versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1);
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-strong_alias (__new_sem_init, __old_sem_init)
-compat_symbol (libpthread, __old_sem_init, sem_init, GLIBC_2_0);
-#endif