svn commit: trunk/uClibc/libpthread: linuxthreads linuxthreads/sysdeps/alpha etc...

aldot at uclibc.org aldot at uclibc.org
Sat Jan 5 11:24:00 UTC 2008


Author: aldot
Date: 2008-01-05 03:24:00 -0800 (Sat, 05 Jan 2008)
New Revision: 20731

Log:
- fixup gnu_inline vs. C99 inline
- add missing header guards while at it


Modified:
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/v850/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/internals.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/arm/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/mips/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/sh/pt-machine.h
   trunk/uClibc/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h


Changeset:
Modified: trunk/uClibc/libpthread/linuxthreads/internals.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/internals.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/internals.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -531,9 +531,9 @@
 # define __manager_thread __pthread_manager_threadp
 #endif
 
-extern __always_inline pthread_descr
+static __always_inline pthread_descr
 check_thread_self (void);
-extern __always_inline pthread_descr
+static __always_inline pthread_descr
 check_thread_self (void)
 {
   pthread_descr self = thread_self ();

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -23,8 +23,14 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
 #ifdef __linux__
@@ -33,9 +39,6 @@
 # include <machine/pal.h>
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
 #define CURRENT_STACK_FRAME  stack_pointer

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/arm/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/arm/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/arm/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,13 +22,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* This will not work on ARM1 or ARM2 because SWP is lacking on those
    machines.  Unfortunately we have no way to detect this at compile
    time; let's hope nobody tries to use one.  */

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -11,6 +11,14 @@
 
 #include <features.h>
 
+#ifndef PT_EI
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
+#endif
+
 static inline int
 _test_and_set (int *p, int v) __THROW
 {
@@ -26,10 +34,6 @@
        return result;
 }
 
-#ifndef PT_EI
-# define PT_EI extern inline
-#endif
-
 extern long int testandset (int *spinlock);
 extern int __compare_and_swap (long int *p, long int oldval, long int newval);
 

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/cris/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/cris/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -21,13 +21,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 PT_EI long int
 testandset (int *spinlock)
 {

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,15 +22,17 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
 #include <bits/initspin.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
 #define CURRENT_STACK_FRAME  stack_pointer

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/i386/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -29,12 +29,17 @@
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
+/*
 extern long int testandset (int *spinlock);
 extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
+*/
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
 #define CURRENT_STACK_FRAME  __builtin_frame_address (0)

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -21,15 +21,17 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
 #include <ia64intrin.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Make sure gcc doesn't try to be clever and move things around on
    us. We need to use _exactly_ the address the user gave us, not some
    alias that contains the same information.  */

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,13 +22,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/mips/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/mips/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/mips/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -24,17 +24,18 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
 #include <sgidefs.h>
 #include <sys/tas.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
-
 /* Spinlock implementation; required.  */
 
 PT_EI long int

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/sh/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/sh/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/sh/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,14 +22,17 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)

Modified: trunk/uClibc/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -21,6 +21,8 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+# include <features.h>
+
 #ifndef __ASSEMBLER__
 # include <stddef.h>	/* For offsetof.  */
 # include <stdlib.h>	/* For abort().  */
@@ -28,12 +30,13 @@
 
 
 # ifndef PT_EI
-#  define PT_EI extern inline __attribute__ ((always_inline))
+#  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#   define PT_EI static inline __attribute__((always_inline))
+#  else
+#   define PT_EI extern inline __attribute__((always_inline))
+#  endif
 # endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
 # define CURRENT_STACK_FRAME  stack_pointer

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -23,8 +23,14 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
 #ifdef __linux__
@@ -33,9 +39,6 @@
 # include <machine/pal.h>
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
 #define CURRENT_STACK_FRAME  stack_pointer

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,13 +22,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* This will not work on ARM1 or ARM2 because SWP is lacking on those
    machines.  Unfortunately we have no way to detect this at compile
    time; let's hope nobody tries to use one.  */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -11,6 +11,14 @@
 
 #include <features.h>
 
+#ifndef PT_EI
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
+#endif
+
 static inline int
 _test_and_set (int *p, int v)
 {

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -21,6 +21,8 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 #  define PT_EI static inline __attribute__((always_inline))

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -17,9 +17,17 @@
    License along with the GNU C Library; see the file COPYING.LIB.  If not,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+#ifndef _PT_MACHINE_H
+#define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
 PT_EI long int
@@ -62,3 +70,5 @@
    I don't trust register variables, so let's do this the safe way.  */
 #define CURRENT_STACK_FRAME \
  ({ char *sp; __asm__ ("move.d $sp,%0" : "=rm" (sp)); sp; })
+
+#endif /* pt-machine.h */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,10 +22,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef __ASSEMBLER__
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
 /* Spinlock implementation; required.  */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,12 +22,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,13 +22,21 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H	1
 
+#include <features.h>
+
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
+/*
 extern long int testandset (int *spinlock);
 extern int __compare_and_swap (long int *p, long int oldval, long int newval);
+*/
 
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -21,6 +21,7 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
 #include <ia64intrin.h>
 
 #include <sys/types.h>
@@ -28,12 +29,13 @@
                      size_t __child_stack_size, int __flags, void *__arg, ...);
 
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Make sure gcc doesn't try to be clever and move things around on
    us. We need to use _exactly_ the address the user gave us, not some
    alias that contains the same information.  */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,13 +22,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -26,6 +26,14 @@
 
 #include <features.h>
 
+#ifndef PT_EI
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
+#endif
+
 /* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Maciej W. Rozycki <macro at ds2.pg.gda.pl>, 2000.  */
@@ -55,14 +63,6 @@
 }
 
 
-#ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
-#endif
-
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
-
 /* Spinlock implementation; required.  */
 
 PT_EI long int

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,11 +22,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
 /* Spinlock implementation; required.  */
 /* it is weird and dangerous to disable interrupt in userspace, but for nios
    what else we can do before we have a swap like instruction?  This is better

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -21,12 +21,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -24,13 +24,16 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* For multiprocessor systems, we want to ensure all memory accesses
    are completed before we reset a lock.  On other systems, we still
    need to make sure that the compiler has flushed everything to memory.  */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,14 +22,17 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -22,15 +22,22 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef _PT_MACHINE_H
+#define _PT_MACHINE_H   1
+
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
-/* Spinlock implementation; required.  */
-extern long int testandset (int *spinlock);
-
-
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
 #define CURRENT_STACK_FRAME  stack_pointer
 register char * stack_pointer __asm__ ("r15");
+
+#endif /* pt-machine.h */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/v850/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/v850/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/v850/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -11,8 +11,17 @@
  * Written by Miles Bader <miles at gnu.org>
  */
 
+#ifndef _PT_MACHINE_H
+#define _PT_MACHINE_H   1
+
+#include <features.h>
+
 #ifndef PT_EI
-# define PT_EI extern inline
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
+# endif
 #endif
 
 /* Get some notion of the current stack.  Need not be exactly the top
@@ -44,3 +53,4 @@
       return 0;
     }
 }
+#endif /* pt-machine.h */

Modified: trunk/uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h	2008-01-05 10:40:51 UTC (rev 20730)
+++ trunk/uClibc/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h	2008-01-05 11:24:00 UTC (rev 20731)
@@ -21,6 +21,8 @@
 #ifndef _PT_MACHINE_H
 #define _PT_MACHINE_H   1
 
+#include <features.h>
+
 #ifndef __ASSEMBLER__
 # include <stddef.h>	/* For offsetof.  */
 # include <stdlib.h>	/* For abort().  */
@@ -28,12 +30,13 @@
 
 
 # ifndef PT_EI
-#  define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#  define PT_EI static inline __attribute__((always_inline))
+# else
+#  define PT_EI extern inline __attribute__((always_inline))
 # endif
+# endif
 
-extern long int testandset (int *__spinlock);
-extern int __compare_and_swap (long int *__p, long int __oldval, long int __newval);
-
 /* Get some notion of the current stack.  Need not be exactly the top
    of the stack, just something somewhere in the current frame.  */
 # define CURRENT_STACK_FRAME  stack_pointer




More information about the uClibc-cvs mailing list