summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-01-01 04:07:14 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2008-01-01 04:07:14 +0000
commita831c87b798b78c22ef496de6ddb2e6e447aabad (patch)
tree9b47b847de2105fcd6464e54106356e791945190
parent0697fd051821d7b44b3c9ab2face57438e1a764a (diff)
2008-01-01 Samuel Thibault <samuel.thibault@ens-lyon.org
* include/pthread/pthread.h (pthread_spin_destroy, pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Use __extern_inline macro instead of extern __inline. * sysdeps/i386/bits/spin-lock.h (__PT_SPIN_INLINE, __pthread_spin_lock): Likewise * sysdeps/mach/bits/spin-lock.h (__PT_SPIN_INLINE, __pthread_spin_lock): Likewise * sysdeps/generic/bits/pthread.h (pthread_equal): Declare ; only provide inline when __USE_EXTERN_INLINES is defined. Use __extern_inline macro instead of extern __inline. * sysdeps/i386/bits/memory.h (__memory_barrier): Add static to inline.
-rw-r--r--ChangeLog14
-rw-r--r--include/pthread/pthread.h10
-rw-r--r--sysdeps/generic/bits/pthread.h7
-rw-r--r--sysdeps/i386/bits/memory.h2
-rw-r--r--sysdeps/i386/bits/spin-lock.h6
-rw-r--r--sysdeps/mach/bits/spin-lock.h6
6 files changed, 32 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 6183909..f063edf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-01-01 Samuel Thibault <samuel.thibault@ens-lyon.org
+
+ * include/pthread/pthread.h (pthread_spin_destroy, pthread_spin_init,
+ pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Use
+ __extern_inline macro instead of extern __inline.
+ * sysdeps/i386/bits/spin-lock.h (__PT_SPIN_INLINE,
+ __pthread_spin_lock): Likewise
+ * sysdeps/mach/bits/spin-lock.h (__PT_SPIN_INLINE,
+ __pthread_spin_lock): Likewise
+ * sysdeps/generic/bits/pthread.h (pthread_equal): Declare ; only
+ provide inline when __USE_EXTERN_INLINES is defined. Use __extern_inline
+ macro instead of extern __inline.
+ * sysdeps/i386/bits/memory.h (__memory_barrier): Add static to inline.
+
2007-11-19 Thomas Schwinge <tschwinge@gnu.org>
* Makefile (CFLAGS): Don't set and instead...
diff --git a/include/pthread/pthread.h b/include/pthread/pthread.h
index 9875c47..9773e68 100644
--- a/include/pthread/pthread.h
+++ b/include/pthread/pthread.h
@@ -454,31 +454,31 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock);
# ifdef __USE_EXTERN_INLINES
-extern __inline int
+__extern_inline int
pthread_spin_destroy (pthread_spinlock_t *__lock)
{
return __pthread_spin_destroy (__lock);
}
-extern __inline int
+__extern_inline int
pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
{
return __pthread_spin_init (__lock, __pshared);
}
-extern __inline int
+__extern_inline int
pthread_spin_lock (pthread_spinlock_t *__lock)
{
return __pthread_spin_lock (__lock);
}
-extern __inline int
+__extern_inline int
pthread_spin_trylock (pthread_spinlock_t *__lock)
{
return __pthread_spin_trylock (__lock);
}
-extern __inline int
+__extern_inline int
pthread_spin_unlock (pthread_spinlock_t *__lock)
{
return __pthread_spin_unlock (__lock);
diff --git a/sysdeps/generic/bits/pthread.h b/sysdeps/generic/bits/pthread.h
index 3f9df13..5e239d6 100644
--- a/sysdeps/generic/bits/pthread.h
+++ b/sysdeps/generic/bits/pthread.h
@@ -24,10 +24,15 @@ typedef int pthread_t;
/* Return true if __T1 and __T2 both name the same thread. Otherwise,
false. */
-extern __inline int
+extern int
+pthread_equal (pthread_t __t1, pthread_t __t2);
+
+#ifdef __USE_EXTERN_INLINES
+__extern_inline int
pthread_equal (pthread_t __t1, pthread_t __t2)
{
return __t1 == __t2;
}
+#endif
#endif /* bits/pthread.h */
diff --git a/sysdeps/i386/bits/memory.h b/sysdeps/i386/bits/memory.h
index 201305b..57c1463 100644
--- a/sysdeps/i386/bits/memory.h
+++ b/sysdeps/i386/bits/memory.h
@@ -21,7 +21,7 @@
#define _BITS_MEMORY_H 1
/* Prevent read and write reordering across this function. */
-inline void
+static inline void
__memory_barrier (void)
{
int i;
diff --git a/sysdeps/i386/bits/spin-lock.h b/sysdeps/i386/bits/spin-lock.h
index e86bc13..d893654 100644
--- a/sysdeps/i386/bits/spin-lock.h
+++ b/sysdeps/i386/bits/spin-lock.h
@@ -42,7 +42,7 @@ typedef __volatile int __pthread_spinlock_t;
# endif
# ifndef __PT_SPIN_INLINE
-# define __PT_SPIN_INLINE extern __inline
+# define __PT_SPIN_INLINE __extern_inline
# endif
__PT_SPIN_INLINE int __pthread_spin_destroy (__pthread_spinlock_t *__lock);
@@ -74,10 +74,10 @@ __pthread_spin_trylock (__pthread_spinlock_t *__lock)
return __locked ? __EBUSY : 0;
}
-extern __inline int __pthread_spin_lock (__pthread_spinlock_t *__lock);
+__extern_inline int __pthread_spin_lock (__pthread_spinlock_t *__lock);
extern int _pthread_spin_lock (__pthread_spinlock_t *__lock);
-extern __inline int
+__extern_inline int
__pthread_spin_lock (__pthread_spinlock_t *__lock)
{
if (__pthread_spin_trylock (__lock))
diff --git a/sysdeps/mach/bits/spin-lock.h b/sysdeps/mach/bits/spin-lock.h
index e137c24..031e9ce 100644
--- a/sysdeps/mach/bits/spin-lock.h
+++ b/sysdeps/mach/bits/spin-lock.h
@@ -41,7 +41,7 @@ typedef __spin_lock_t __pthread_spinlock_t;
# endif
# ifndef __PT_SPIN_INLINE
-# define __PT_SPIN_INLINE extern __inline
+# define __PT_SPIN_INLINE __extern_inline
# endif
__PT_SPIN_INLINE int __pthread_spin_destroy (__pthread_spinlock_t *__lock);
@@ -70,10 +70,10 @@ __pthread_spin_trylock (__pthread_spinlock_t *__lock)
return __spin_try_lock (__lock) ? 0 : __EBUSY;
}
-extern __inline int __pthread_spin_lock (__pthread_spinlock_t *__lock);
+__extern_inline int __pthread_spin_lock (__pthread_spinlock_t *__lock);
extern int _pthread_spin_lock (__pthread_spinlock_t *__lock);
-extern __inline int
+__extern_inline int
__pthread_spin_lock (__pthread_spinlock_t *__lock)
{
if (__pthread_spin_trylock (__lock))