diff options
author | Andreas Jaeger <aj@suse.de> | 2002-03-17 12:10:08 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2002-03-17 12:10:08 +0000 |
commit | f68137c94b74bbe84eaa47c959da8576b9eca3a4 (patch) | |
tree | ab95b19d5093e38d4239a219edd53ffd9f7112bf /linuxthreads/sysdeps | |
parent | 7f0244deedca55b65c74130fcc940ceb20c74516 (diff) | |
download | glibc-f68137c94b74bbe84eaa47c959da8576b9eca3a4.zip glibc-f68137c94b74bbe84eaa47c959da8576b9eca3a4.tar.gz glibc-f68137c94b74bbe84eaa47c959da8576b9eca3a4.tar.bz2 |
* 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-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.
Diffstat (limited to 'linuxthreads/sysdeps')
-rw-r--r-- | linuxthreads/sysdeps/alpha/pt-machine.h | 4 | ||||
-rw-r--r-- | linuxthreads/sysdeps/arm/pt-machine.h | 5 | ||||
-rw-r--r-- | linuxthreads/sysdeps/cris/pt-machine.h | 5 | ||||
-rw-r--r-- | linuxthreads/sysdeps/hppa/pt-machine.h | 5 | ||||
-rw-r--r-- | linuxthreads/sysdeps/i386/i686/pt-machine.h | 3 | ||||
-rw-r--r-- | linuxthreads/sysdeps/i386/pt-machine.h | 3 | ||||
-rw-r--r-- | linuxthreads/sysdeps/ia64/pt-machine.h | 5 | ||||
-rw-r--r-- | linuxthreads/sysdeps/m68k/pt-machine.h | 4 | ||||
-rw-r--r-- | linuxthreads/sysdeps/mips/pt-machine.h | 3 | ||||
-rw-r--r-- | linuxthreads/sysdeps/powerpc/pt-machine.h | 7 | ||||
-rw-r--r-- | linuxthreads/sysdeps/s390/s390-32/pt-machine.h | 6 | ||||
-rw-r--r-- | linuxthreads/sysdeps/s390/s390-64/pt-machine.h | 6 | ||||
-rw-r--r-- | linuxthreads/sysdeps/sh/pt-machine.h | 5 | ||||
-rw-r--r-- | linuxthreads/sysdeps/sparc/sparc32/pt-machine.h | 5 | ||||
-rw-r--r-- | linuxthreads/sysdeps/sparc/sparc64/pt-machine.h | 4 | ||||
-rw-r--r-- | linuxthreads/sysdeps/x86_64/pt-machine.h | 3 |
16 files changed, 58 insertions, 15 deletions
diff --git a/linuxthreads/sysdeps/alpha/pt-machine.h b/linuxthreads/sysdeps/alpha/pt-machine.h index fc2b83f..68f4574 100644 --- a/linuxthreads/sysdeps/alpha/pt-machine.h +++ b/linuxthreads/sysdeps/alpha/pt-machine.h @@ -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. */ diff --git a/linuxthreads/sysdeps/arm/pt-machine.h b/linuxthreads/sysdeps/arm/pt-machine.h index 1079de4..cab724a 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 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>. @@ -19,10 +19,13 @@ 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 diff --git a/linuxthreads/sysdeps/cris/pt-machine.h b/linuxthreads/sysdeps/cris/pt-machine.h index 9f97394..3e621d8 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 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) { diff --git a/linuxthreads/sysdeps/hppa/pt-machine.h b/linuxthreads/sysdeps/hppa/pt-machine.h index 4035349..c8064b7 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 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 diff --git a/linuxthreads/sysdeps/i386/i686/pt-machine.h b/linuxthreads/sysdeps/i386/i686/pt-machine.h index b38d2b7..6b5b7af 100644 --- a/linuxthreads/sysdeps/i386/i686/pt-machine.h +++ b/linuxthreads/sysdeps/i386/i686/pt-machine.h @@ -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) diff --git a/linuxthreads/sysdeps/i386/pt-machine.h b/linuxthreads/sysdeps/i386/pt-machine.h index c9aa6e7..5a75858 100644 --- a/linuxthreads/sysdeps/i386/pt-machine.h +++ b/linuxthreads/sysdeps/i386/pt-machine.h @@ -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) diff --git a/linuxthreads/sysdeps/ia64/pt-machine.h b/linuxthreads/sysdeps/ia64/pt-machine.h index 216485e..d3585ec 100644 --- a/linuxthreads/sysdeps/ia64/pt-machine.h +++ b/linuxthreads/sysdeps/ia64/pt-machine.h @@ -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. */ diff --git a/linuxthreads/sysdeps/m68k/pt-machine.h b/linuxthreads/sysdeps/m68k/pt-machine.h index 963b195..578d4ed 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 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 diff --git a/linuxthreads/sysdeps/mips/pt-machine.h b/linuxthreads/sysdeps/mips/pt-machine.h index 78bd682..a958116 100644 --- a/linuxthreads/sysdeps/mips/pt-machine.h +++ b/linuxthreads/sysdeps/mips/pt-machine.h @@ -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") diff --git a/linuxthreads/sysdeps/powerpc/pt-machine.h b/linuxthreads/sysdeps/powerpc/pt-machine.h index 5a684e9..bac2491 100644 --- a/linuxthreads/sysdeps/powerpc/pt-machine.h +++ b/linuxthreads/sysdeps/powerpc/pt-machine.h @@ -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; diff --git a/linuxthreads/sysdeps/s390/s390-32/pt-machine.h b/linuxthreads/sysdeps/s390/s390-32/pt-machine.h index f84ccdf..2ff5f42 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 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; } - diff --git a/linuxthreads/sysdeps/s390/s390-64/pt-machine.h b/linuxthreads/sysdeps/s390/s390-64/pt-machine.h index 8b12335..15e9030 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 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; } - diff --git a/linuxthreads/sysdeps/sh/pt-machine.h b/linuxthreads/sysdeps/sh/pt-machine.h index ae74c47..0975fed 100644 --- a/linuxthreads/sysdeps/sh/pt-machine.h +++ b/linuxthreads/sysdeps/sh/pt-machine.h @@ -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) diff --git a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h index c13c62e..3fbf9f3 100644 --- a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h +++ b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h @@ -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) diff --git a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h index d4d4566..be7d5a1 100644 --- a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h +++ b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h @@ -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 diff --git a/linuxthreads/sysdeps/x86_64/pt-machine.h b/linuxthreads/sysdeps/x86_64/pt-machine.h index 17caf6c..b730905 100644 --- a/linuxthreads/sysdeps/x86_64/pt-machine.h +++ b/linuxthreads/sysdeps/x86_64/pt-machine.h @@ -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 |