summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h')
-rw-r--r--libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h b/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h
index b30ab8518..66f9652fa 100644
--- a/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h
+++ b/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h
@@ -21,6 +21,8 @@
#ifndef _PT_MACHINE_H
#define _PT_MACHINE_H 1
+# include <features.h>
+
#ifndef __ASSEMBLER__
# include <stddef.h> /* For offsetof. */
# include <stdlib.h> /* For abort(). */
@@ -28,12 +30,13 @@
# ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# define PT_EI static inline __attribute__((always_inline))
+# else
+# define PT_EI extern inline __attribute__((always_inline))
+# endif
# 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