summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/sysdeps/cris/pt-machine.h')
-rw-r--r--libpthread/linuxthreads/sysdeps/cris/pt-machine.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/libpthread/linuxthreads/sysdeps/cris/pt-machine.h b/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
index e8073559a..eaead3058 100644
--- a/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
+++ b/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
@@ -1,27 +1,33 @@
/* 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
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
+ You should have received a copy of the GNU Lesser General Public
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
+
#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);
+
PT_EI long int
testandset (int *spinlock)
{
@@ -37,7 +43,7 @@ testandset (int *spinlock)
"bwf 0b\n\t"
"clearf"
: "=&r" (ret), "=m" (*spinlock)
- : "r" (spinlock), "r" ((int) 1), "m" (*spinlock)
+ : "r" (spinlock), "r" ((int) 1)
: "memory");
return ret;
}
@@ -48,3 +54,5 @@ testandset (int *spinlock)
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 */