summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/sysdeps/x86_64
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-29 03:22:36 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-29 03:22:36 +0000
commitfcd11317c46159948085ad432ef41fd91ff67f1e (patch)
treef46130ca29190c0b2eb5fe84069df71ff08c21d3 /libpthread/linuxthreads.old/sysdeps/x86_64
parent6477e385d9903a942cdae6a04da472e9fa3d3f5c (diff)
since these functions get exported, namespace the arguments
Diffstat (limited to 'libpthread/linuxthreads.old/sysdeps/x86_64')
-rw-r--r--libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
index 8a2d1a762..f6ff845ac 100644
--- a/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
+++ b/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
@@ -31,8 +31,8 @@
# 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);
+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. */
@@ -42,14 +42,14 @@ register char * stack_pointer __asm__ ("%rsp") __attribute_used__;
/* Spinlock implementation; required. */
PT_EI long int
-testandset (int *spinlock)
+testandset (int *__spinlock)
{
long int ret;
__asm__ __volatile__ (
"xchgl %k0, %1"
- : "=r"(ret), "=m"(*spinlock)
- : "0"(1), "m"(*spinlock)
+ : "=r"(ret), "=m"(*__spinlock)
+ : "0"(1), "m"(*__spinlock)
: "memory");
return ret;
@@ -60,14 +60,14 @@ testandset (int *spinlock)
# define HAS_COMPARE_AND_SWAP
PT_EI int
-__compare_and_swap (long int *p, long int oldval, long int newval)
+__compare_and_swap (long int *__p, long int __oldval, long int __newval)
{
char ret;
long int readval;
__asm__ __volatile__ ("lock; cmpxchgq %3, %1; sete %0"
- : "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval)
+ : "=q" (ret), "=m" (*__p), "=a" (readval)
+ : "r" (__newval), "m" (*__p), "a" (__oldval)
: "memory");
return ret;
}