summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog27
-rw-r--r--linuxthreads/Examples/ex13.c6
-rw-r--r--linuxthreads/spinlock.h2
-rw-r--r--linuxthreads/sysdeps/alpha/pt-machine.h5
-rw-r--r--linuxthreads/sysdeps/arm/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/cris/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/hppa/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/i386/i686/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/i386/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/ia64/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/ia64/tls.h2
-rw-r--r--linuxthreads/sysdeps/m68k/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/mips/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h5
-rw-r--r--linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/s390/s390-32/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/s390/s390-64/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/sh/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/sparc/sparc32/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/sparc/sparc64/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/x86_64/pt-machine.h4
-rw-r--r--linuxthreads/tst-cancel.c9
22 files changed, 67 insertions, 37 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 288d3523ab..50244ea530 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,30 @@
+2003-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/alpha/pt-machine.h (PT_EI): Add
+	__attribute__((always_inline)).
+	* sysdeps/arm/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/cris/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/i386/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/mips/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/sh/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
+	* sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
+	* spinlock.h (__pthread_set_own_extricate_if): Likewise.
+	* sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
+	(__thread_self).
+	* Examples/ex13.c (main): Change res type to void * to avoid
+	warnings.
+	* tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
+
 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
 
 	* pthread.c (init_one_static_tls, __pthread_init_static_tls): New
diff --git a/linuxthreads/Examples/ex13.c b/linuxthreads/Examples/ex13.c
index c485039d51..14add6c773 100644
--- a/linuxthreads/Examples/ex13.c
+++ b/linuxthreads/Examples/ex13.c
@@ -1,5 +1,5 @@
 /* Test for Pthreads/mutexes.
-   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Kurt Garloff <garloff@suse.de>, 2000.
 
@@ -80,7 +80,7 @@ main (void)
   struct thr_ctrl threadctrl;
   pthread_t thread;
   int err;
-  int *res = &threadctrl.retval;
+  void *res = &threadctrl.retval;
   pthread_mutexattr_t mutattr;
   pthread_mutexattr_init (&mutattr);
   pthread_mutex_init (&threadctrl.mutex, &mutattr);
@@ -106,7 +106,7 @@ main (void)
       abort ();
     };
   dump_mut (&threadctrl.mutex);
-  pthread_join (thread, (void **) &res);
+  pthread_join (thread, &res);
   printf ("OK\n");
   return 0;
 }
diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h
index 0ec40c57cb..ff96fc3360 100644
--- a/linuxthreads/spinlock.h
+++ b/linuxthreads/spinlock.h
@@ -196,7 +196,7 @@ static inline long atomic_decrement(struct pthread_atomic *pa)
 }
 
 
-static inline void
+static inline __attribute__((always_inline)) void
 __pthread_set_own_extricate_if (pthread_descr self, pthread_extricate_if *peif)
 {
   /* Only store a non-null peif if the thread has cancellation enabled.
diff --git a/linuxthreads/sysdeps/alpha/pt-machine.h b/linuxthreads/sysdeps/alpha/pt-machine.h
index fa0374bc5b..853ac6f04a 100644
--- a/linuxthreads/sysdeps/alpha/pt-machine.h
+++ b/linuxthreads/sysdeps/alpha/pt-machine.h
@@ -1,6 +1,7 @@
 /* Machine-dependent pthreads configuration and inline functions.
    Alpha version.
-   Copyright (C) 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,7 +24,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 #ifdef __linux__
diff --git a/linuxthreads/sysdeps/arm/pt-machine.h b/linuxthreads/sysdeps/arm/pt-machine.h
index 71001ebc25..a4c2f314cb 100644
--- a/linuxthreads/sysdeps/arm/pt-machine.h
+++ b/linuxthreads/sysdeps/arm/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    ARM version.
-   Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@gnu.org>.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/cris/pt-machine.h b/linuxthreads/sysdeps/cris/pt-machine.h
index eaead30589..431da7101d 100644
--- a/linuxthreads/sysdeps/cris/pt-machine.h
+++ b/linuxthreads/sysdeps/cris/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    CRIS version.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/hppa/pt-machine.h b/linuxthreads/sysdeps/hppa/pt-machine.h
index f4c6ff92eb..abc25c4ca4 100644
--- a/linuxthreads/sysdeps/hppa/pt-machine.h
+++ b/linuxthreads/sysdeps/hppa/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    hppa version.
-   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -25,7 +25,7 @@
 #include <bits/initspin.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/i386/i686/pt-machine.h b/linuxthreads/sysdeps/i386/i686/pt-machine.h
index 3c28118f2e..1c75bf9807 100644
--- a/linuxthreads/sysdeps/i386/i686/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/i686/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    i686 version.
-   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H	1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 #include "kernel-features.h"
 
diff --git a/linuxthreads/sysdeps/i386/pt-machine.h b/linuxthreads/sysdeps/i386/pt-machine.h
index 79c69b549a..0df096d152 100644
--- a/linuxthreads/sysdeps/i386/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    i386 version.
-   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -24,7 +24,7 @@
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/ia64/pt-machine.h b/linuxthreads/sysdeps/ia64/pt-machine.h
index c4383125e5..ee489a7fc0 100644
--- a/linuxthreads/sysdeps/ia64/pt-machine.h
+++ b/linuxthreads/sysdeps/ia64/pt-machine.h
@@ -24,7 +24,7 @@
 #include <ia64intrin.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/ia64/tls.h b/linuxthreads/sysdeps/ia64/tls.h
index 7aec4f4f8a..db810d1872 100644
--- a/linuxthreads/sysdeps/ia64/tls.h
+++ b/linuxthreads/sysdeps/ia64/tls.h
@@ -84,7 +84,7 @@ typedef struct
    special attention since 'errno' is not yet available and if the
    operation can cause a failure 'errno' must not be touched.  */
 #  define TLS_INIT_TP(tcbp, secondcall) \
-  (__thread_self = (tcbp), NULL)
+  (__thread_self = (__typeof (__thread_self)) (tcbp), NULL)
 
 /* Return the address of the dtv for the current thread.  */
 #  define THREAD_DTV() \
diff --git a/linuxthreads/sysdeps/m68k/pt-machine.h b/linuxthreads/sysdeps/m68k/pt-machine.h
index 161b534691..ad524d6d2e 100644
--- a/linuxthreads/sysdeps/m68k/pt-machine.h
+++ b/linuxthreads/sysdeps/m68k/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    m68k version.
-   Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/mips/pt-machine.h b/linuxthreads/sysdeps/mips/pt-machine.h
index b1375d5cb7..f9028d2640 100644
--- a/linuxthreads/sysdeps/mips/pt-machine.h
+++ b/linuxthreads/sysdeps/mips/pt-machine.h
@@ -27,7 +27,7 @@
 #include <sys/tas.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h b/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
index f38f466bc3..8363d16d08 100644
--- a/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
+++ b/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
@@ -1,6 +1,7 @@
 /* Machine-dependent pthreads configuration and inline functions.
    powerpc version.
-   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +26,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h b/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
index e3a153af14..f28e8080bb 100644
--- a/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
+++ b/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
@@ -25,7 +25,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/s390/s390-32/pt-machine.h b/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
index e95922dc14..398332965f 100644
--- a/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
+++ b/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    S390 version.
-   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/s390/s390-64/pt-machine.h b/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
index eaa5abb6bf..49f8ae2b9a 100644
--- a/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
+++ b/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    64 bit S/390 version.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/sh/pt-machine.h b/linuxthreads/sysdeps/sh/pt-machine.h
index 68dd310594..02545e6b45 100644
--- a/linuxthreads/sysdeps/sh/pt-machine.h
+++ b/linuxthreads/sysdeps/sh/pt-machine.h
@@ -24,7 +24,7 @@
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
index f60d806d83..322a52051f 100644
--- a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
index 0d8a7027e8..f65c13be1b 100644
--- a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/sysdeps/x86_64/pt-machine.h b/linuxthreads/sysdeps/x86_64/pt-machine.h
index 0a366c56eb..bd53069a78 100644
--- a/linuxthreads/sysdeps/x86_64/pt-machine.h
+++ b/linuxthreads/sysdeps/x86_64/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    x86-64 version.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@
 
 
 # ifndef PT_EI
-#  define PT_EI extern inline
+#  define PT_EI extern inline __attribute__ ((always_inline))
 # endif
 
 extern long int testandset (int *spinlock);
diff --git a/linuxthreads/tst-cancel.c b/linuxthreads/tst-cancel.c
index da32aaf5ea..59c6f1f511 100644
--- a/linuxthreads/tst-cancel.c
+++ b/linuxthreads/tst-cancel.c
@@ -12,6 +12,7 @@ int fd;
 pthread_barrier_t bar;
 
 
+#ifdef NOT_YET
 static void
 cleanup (void *arg)
 {
@@ -52,7 +53,7 @@ t2 (void *arg)
   return NULL;
   pthread_cleanup_pop (0);
 }
-
+#endif
 
 /* This does not work yet.  */
 volatile int cleanupokcnt;
@@ -63,7 +64,7 @@ cleanupok (void *arg)
   ++cleanupokcnt;
 }
 
-
+#ifdef NOT_YET
 static void *
 t3 (void *arg)
 {
@@ -72,7 +73,7 @@ t3 (void *arg)
   pthread_exit (NULL);
   pthread_cleanup_pop (0);
 }
-
+#endif
 
 static void
 innerok (int a)
@@ -170,7 +171,7 @@ main (int argc, char *argv[])
   err = pthread_create (&td, NULL, t4, (void *) 7);
   if (err != 0)
     {
-      printf ("cannot create thread t3: %s\n", strerror (err));
+      printf ("cannot create thread t4: %s\n", strerror (err));
       exit (1);
     }