[uClibc-cvs] svn commit: trunk/uClibc/libpthread/nptl

sjhill at uclibc.org sjhill at uclibc.org
Wed May 11 23:53:21 UTC 2005


Author: sjhill
Date: 2005-05-11 17:53:20 -0600 (Wed, 11 May 2005)
New Revision: 10302

Log:
More glibc backward compatibility cruft. Oh the horror!


Modified:
   trunk/uClibc/libpthread/nptl/forward.c
   trunk/uClibc/libpthread/nptl/init.c
   trunk/uClibc/libpthread/nptl/pthread_attr_destroy.c
   trunk/uClibc/libpthread/nptl/pthread_attr_init.c
   trunk/uClibc/libpthread/nptl/pthread_attr_setstack.c
   trunk/uClibc/libpthread/nptl/pthread_attr_setstacksize.c
   trunk/uClibc/libpthread/nptl/pthread_cond_destroy.c
   trunk/uClibc/libpthread/nptl/pthread_cond_init.c
   trunk/uClibc/libpthread/nptl/pthread_create.c
   trunk/uClibc/libpthread/nptl/sem_destroy.c
   trunk/uClibc/libpthread/nptl/sem_getvalue.c
   trunk/uClibc/libpthread/nptl/sem_init.c


Changeset:
Modified: trunk/uClibc/libpthread/nptl/forward.c
===================================================================
--- trunk/uClibc/libpthread/nptl/forward.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/forward.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -22,7 +22,6 @@
 #include <signal.h>
 #include <stdlib.h>
 
-#include <shlib-compat.h>
 #include <atomic.h>
 #include <sysdep.h>
 

Modified: trunk/uClibc/libpthread/nptl/init.c
===================================================================
--- trunk/uClibc/libpthread/nptl/init.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/init.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -30,7 +30,6 @@
 #include <tls.h>
 #include <fork.h>
 #include <version.h>
-#include <shlib-compat.h>
 #include <smp.h>
 #include <lowlevellock.h>
 

Modified: trunk/uClibc/libpthread/nptl/pthread_attr_destroy.c
===================================================================
--- trunk/uClibc/libpthread/nptl/pthread_attr_destroy.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/pthread_attr_destroy.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -22,7 +22,6 @@
 #include <string.h>
 #include <unistd.h>
 #include "pthreadP.h"
-#include <shlib-compat.h>
 
 int
 __pthread_attr_destroy (attr)
@@ -33,11 +32,6 @@
   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);
 

Modified: trunk/uClibc/libpthread/nptl/pthread_attr_init.c
===================================================================
--- trunk/uClibc/libpthread/nptl/pthread_attr_init.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/pthread_attr_init.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -23,9 +23,7 @@
 #include <unistd.h>
 #include "pthreadP.h"
 
-#include <shlib-compat.h>
 
-
 struct pthread_attr *__attr_list;
 lll_lock_t __attr_list_lock = LLL_LOCK_INITIALIZER;
 
@@ -51,38 +49,3 @@
 }
 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

Modified: trunk/uClibc/libpthread/nptl/pthread_attr_setstack.c
===================================================================
--- trunk/uClibc/libpthread/nptl/pthread_attr_setstack.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/pthread_attr_setstack.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -49,41 +49,4 @@
   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

Modified: trunk/uClibc/libpthread/nptl/pthread_attr_setstacksize.c
===================================================================
--- trunk/uClibc/libpthread/nptl/pthread_attr_setstacksize.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/pthread_attr_setstacksize.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -42,34 +42,4 @@
   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

Modified: trunk/uClibc/libpthread/nptl/pthread_cond_destroy.c
===================================================================
--- trunk/uClibc/libpthread/nptl/pthread_cond_destroy.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/pthread_cond_destroy.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -18,7 +18,6 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#include <shlib-compat.h>
 #include "pthreadP.h"
 
 

Modified: trunk/uClibc/libpthread/nptl/pthread_cond_init.c
===================================================================
--- trunk/uClibc/libpthread/nptl/pthread_cond_init.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/pthread_cond_init.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -17,7 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <shlib-compat.h>
 #include "pthreadP.h"
 
 

Modified: trunk/uClibc/libpthread/nptl/pthread_create.c
===================================================================
--- trunk/uClibc/libpthread/nptl/pthread_create.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/pthread_create.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -28,9 +28,7 @@
 #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);
 

Modified: trunk/uClibc/libpthread/nptl/sem_destroy.c
===================================================================
--- trunk/uClibc/libpthread/nptl/sem_destroy.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/sem_destroy.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -18,7 +18,6 @@
    02111-1307 USA.  */
 
 #include <semaphore.h>
-#include <shlib-compat.h>
 #include "semaphoreP.h"
 
 
@@ -32,7 +31,3 @@
   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

Modified: trunk/uClibc/libpthread/nptl/sem_getvalue.c
===================================================================
--- trunk/uClibc/libpthread/nptl/sem_getvalue.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/sem_getvalue.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -18,7 +18,6 @@
    02111-1307 USA.  */
 
 #include <semaphore.h>
-#include <shlib-compat.h>
 #include "semaphoreP.h"
 
 
@@ -36,7 +35,3 @@
   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

Modified: trunk/uClibc/libpthread/nptl/sem_init.c
===================================================================
--- trunk/uClibc/libpthread/nptl/sem_init.c	2005-05-11 23:44:35 UTC (rev 10301)
+++ trunk/uClibc/libpthread/nptl/sem_init.c	2005-05-11 23:53:20 UTC (rev 10302)
@@ -20,7 +20,6 @@
 #include <errno.h>
 #include <semaphore.h>
 #include <lowlevellock.h>
-#include <shlib-compat.h>
 #include "semaphoreP.h"
 
 
@@ -49,7 +48,3 @@
   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




More information about the uClibc-cvs mailing list