]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
authorAndreas Jaeger <aj@suse.de>
Sun, 17 Mar 2002 12:10:08 +0000 (12:10 +0000)
committerAndreas Jaeger <aj@suse.de>
Sun, 17 Mar 2002 12:10:08 +0000 (12:10 +0000)
prototpyes.
* sysdeps/alpha/pt-machine.h: Likewise.
* sysdeps/arm/pt-machine.h: Likewise.
* sysdeps/cris/pt-machine.h: Likewise.
* sysdeps/hppa/pt-machine.h: Likewise.
* sysdeps/i386/i686/pt-machine.h: Likewise.
* sysdeps/ia64/pt-machine.h: Likewise.
* sysdeps/m68k/pt-machine.h: Likewise.
* sysdeps/mips/pt-machine.h: Likewise.
* sysdeps/powerpc/pt-machine.h: Likewise.
* sysdeps/s390/s390-32/pt-machine.h: Likewise.
* sysdeps/s390/s390-64/pt-machine.h: Likewise.
* sysdeps/sh/pt-machine.h: Likewise.
* sysdeps/sparc/sparc32/pt-machine.h: Likewise.
* sysdeps/sparc/sparc64/pt-machine.h: Likewise.
* sysdeps/x86_64/pt-machine.h: Likewise.
* internals.h: Move testandset and __compare_and_swap prototypes
to pt-machine.h.
2002-03-17  Andreas Jaeger  <aj@suse.de>

* sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
prototpyes.
* sysdeps/alpha/pt-machine.h: Likewise.
* sysdeps/arm/pt-machine.h: Likewise.
* sysdeps/cris/pt-machine.h: Likewise.
* sysdeps/hppa/pt-machine.h: Likewise.
* sysdeps/i386/i686/pt-machine.h: Likewise.
* sysdeps/ia64/pt-machine.h: Likewise.
* sysdeps/m68k/pt-machine.h: Likewise.
* sysdeps/mips/pt-machine.h: Likewise.
* sysdeps/powerpc/pt-machine.h: Likewise.
* sysdeps/s390/s390-32/pt-machine.h: Likewise.
* sysdeps/s390/s390-64/pt-machine.h: Likewise.
* sysdeps/sh/pt-machine.h: Likewise.
* sysdeps/sparc/sparc32/pt-machine.h: Likewise.
* sysdeps/sparc/sparc64/pt-machine.h: Likewise.
* sysdeps/x86_64/pt-machine.h: Likewise.

* internals.h: Move testandset and __compare_and_swap prototypes
to pt-machine.h.

18 files changed:
linuxthreads/ChangeLog
linuxthreads/internals.h
linuxthreads/sysdeps/alpha/pt-machine.h
linuxthreads/sysdeps/arm/pt-machine.h
linuxthreads/sysdeps/cris/pt-machine.h
linuxthreads/sysdeps/hppa/pt-machine.h
linuxthreads/sysdeps/i386/i686/pt-machine.h
linuxthreads/sysdeps/i386/pt-machine.h
linuxthreads/sysdeps/ia64/pt-machine.h
linuxthreads/sysdeps/m68k/pt-machine.h
linuxthreads/sysdeps/mips/pt-machine.h
linuxthreads/sysdeps/powerpc/pt-machine.h
linuxthreads/sysdeps/s390/s390-32/pt-machine.h
linuxthreads/sysdeps/s390/s390-64/pt-machine.h
linuxthreads/sysdeps/sh/pt-machine.h
linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
linuxthreads/sysdeps/x86_64/pt-machine.h

index ebb9ac0c7698039639696bf2a7be36ff235467cb..8ba4345f39cae1f6702e1acb1803178bef817dd7 100644 (file)
@@ -1,3 +1,26 @@
+2002-03-17  Andreas Jaeger  <aj@suse.de>
+
+       * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
+       prototpyes.
+       * sysdeps/alpha/pt-machine.h: Likewise.
+       * sysdeps/arm/pt-machine.h: Likewise.
+       * sysdeps/cris/pt-machine.h: Likewise.
+       * sysdeps/hppa/pt-machine.h: Likewise.
+       * sysdeps/i386/i686/pt-machine.h: Likewise.
+       * sysdeps/ia64/pt-machine.h: Likewise.
+       * sysdeps/m68k/pt-machine.h: Likewise.
+       * sysdeps/mips/pt-machine.h: Likewise.
+       * sysdeps/powerpc/pt-machine.h: Likewise.
+       * sysdeps/s390/s390-32/pt-machine.h: Likewise.
+       * sysdeps/s390/s390-64/pt-machine.h: Likewise.
+       * sysdeps/sh/pt-machine.h: Likewise.
+       * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
+       * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
+       * sysdeps/x86_64/pt-machine.h: Likewise.
+
+       * internals.h: Move testandset and __compare_and_swap prototypes
+       to pt-machine.h.
+
 2002-03-03  Andreas Jaeger  <aj@suse.de>
 
        * errno.c: Include resolv.h to avoid warning.
index 209812c3da1b96553a1288805941f1847346fe25..8fef62f7bd85b03447a1e70593076108ee35de35 100644 (file)
@@ -26,9 +26,6 @@
 #include <tls.h>
 #include "descr.h"
 
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
 #include "semaphore.h"
 
 #ifndef THREAD_GETMEM
index fc2b83fbf6f382cad39ef781569583f2781de234..68f4574476b1e1239d21524869f1e1c61e388744 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    Alpha version.
-   Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -25,6 +25,8 @@
 
 #include <asm/pal.h>
 
+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.  */
index 1079de4a4182d9e102f82d436d8fff0e988a7f69..cab724a668cf29b8392123f8b1a7eeff15654e7b 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    ARM version.
-   Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@gnu.org>.
 
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+
 #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);
 
 /* 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
index 9f9739492a98d0a7edabf5bd5a3fa77c5a65fe40..3e621d8b77b54f419ea6d76252d2dbf56fbbfcd2 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    CRIS version.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002 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,6 +22,9 @@
 # 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);
+
 PT_EI long int
 testandset (int *spinlock)
 {
index 4035349f48bf2e69dcda1651601c27a6d7a29ec7..c8064b75fb0748222158b2e61afca1d0486a5a11 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    hppa version.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -25,6 +25,9 @@
 # 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);
+
 /* 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
index b38d2b7ab8a58bd30962825e941e881e7ed0761f..6b5b7afeeef0417dd33488fd4d754b2d0c85e32e 100644 (file)
@@ -27,6 +27,9 @@
 #endif
 #include "kernel-features.h"
 
+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)
index c9aa6e7778e0552b3f579003fcfc7024fae92feb..5a758584da0969ebd17e5338d1d9c868fbc3f4b1 100644 (file)
@@ -26,6 +26,9 @@
 # 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);
+
 /* 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)
index 216485ea68a9f7ab85d9b29518b6296a1d1815c4..d3585ec35b3af5989739ceaf33230d5aec870788 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    IA-64 version.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2002 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,6 +22,9 @@
 # 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);
+
 /* 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.  */
index 963b1956f8134c22ebe268ca6fb31124e3e55fa5..578d4ed4c7433c303cf7a83650c78cab6ccbd90c 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    m68k version.
-   Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,6 +23,8 @@
 # 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);
 
 /* Spinlock implementation; required.  */
 PT_EI long int
index 78bd6828a18eba2f9e5d8efe2083eaaef78dc891..a9581163f7f32e061db3d9164d9cdcfc7bc82a2a 100644 (file)
@@ -27,6 +27,9 @@
 # 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);
+
 /* Memory barrier.  */
 #define MEMORY_BARRIER() __asm__ ("" : : : "memory")
 
index 5a684e9b13c5a7c144c66ebb91f9037cc5b68e68..bac2491243ec0e6cbe491113ef09dd62b8dece47 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    powerpc version.
-   Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002 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,6 +25,9 @@
 # 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);
+
 /* 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.  */
@@ -65,7 +68,7 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
 }
 
 PT_EI int
-__compare_and_swap_with_release_semantics (long int *p, 
+__compare_and_swap_with_release_semantics (long int *p,
                                           long int oldval, long int newval)
 {
   int ret;
index f84ccdfc9032372da190715f4217ad7d350b2a75..2ff5f4234da333e86d2567c11f6c71440547d797 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    S390 version.
-   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -23,6 +23,9 @@
 # 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);
+
 /* 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.  */
@@ -98,4 +101,3 @@ __compare_and_swap(long int *p, long int oldval, long int newval)
                 : "cc", "0", "1" );
         return retval == 0;
 }
-
index 8b123352d99ceb730f88c09f5dede7fc6c11660d..15e9030c02cc007e8e9933694bb5908003ae6bf4 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    64 bit S/390 version.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -23,6 +23,9 @@
 # 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);
+
 /* 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.  */
@@ -103,4 +106,3 @@ __compare_and_swap(long int *p, long int oldval, long int newval)
                 : "cc", "0");
         return retval == 0;
 }
-
index ae74c475bd017ae76faed42c503c656136fbfd11..0975fed0a402b2fc13c9e6c3783f44234785165d 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    SuperH version.
-   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Niibe Yutaka <gniibe@m17n.org>.
 
@@ -23,6 +23,9 @@
 # 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);
+
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)
index c13c62e5dc84bdced5f8f73ea88c877681faa2e6..3fbf9f37ef7bb6d9af600cf366dbb1d8d2c44ec1 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    sparc version.
-   Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,6 +23,9 @@
 # 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);
+
 /* Spinlock implementation; required.  */
 PT_EI long int
 testandset (int *spinlock)
index d4d456630ddff4998292e4d2cd89d2421cf02f68..be7d5a1a30f4f9c248a22142470b60e7cecdf520 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    Sparc v9 version.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,6 +23,8 @@
 # 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);
 
 /* Spinlock implementation; required.  */
 PT_EI long int
index 17caf6c258095af8a6902af676cb62a1386e1147..b730905dc8120365dd6cfa2cda49db2ea707a133 100644 (file)
@@ -27,6 +27,9 @@
 # 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);
+
 /* 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