about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 16:34:26 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 16:36:37 +0000
commit865bf7110936d46c01a673e3327a6bd8b2a06082 (patch)
treee6d961eba8ccfb9dd7f2a712f3af2160b7f4068c
parentcca76b6db216805267212ab03c8691e8e6960338 (diff)
downloadglibc-865bf7110936d46c01a673e3327a6bd8b2a06082.tar.gz
glibc-865bf7110936d46c01a673e3327a6bd8b2a06082.tar.xz
glibc-865bf7110936d46c01a673e3327a6bd8b2a06082.zip
htl: Do not put spin_lock inlines in public headers
They were not getting used anyway.
Also do not make libsupport use them, it would make tests using it have
to be made to link against libmachuser for gsync_wait.
-rw-r--r--sysdeps/htl/include/pthread.h36
-rw-r--r--sysdeps/htl/pthread.h36
2 files changed, 36 insertions, 36 deletions
diff --git a/sysdeps/htl/include/pthread.h b/sysdeps/htl/include/pthread.h
new file mode 100644
index 0000000000..173b1eb08d
--- /dev/null
+++ b/sysdeps/htl/include/pthread.h
@@ -0,0 +1,36 @@
+#ifndef	_PTHREAD_H
+#include_next <pthread.h>
+#if defined __USE_EXTERN_INLINES && defined _LIBC && !IS_IN (libsupport)
+# include <bits/spin-lock-inline.h>
+
+__extern_inline int
+pthread_spin_destroy (pthread_spinlock_t *__lock)
+{
+  return __pthread_spin_destroy (__lock);
+}
+
+__extern_inline int
+pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
+{
+  return __pthread_spin_init (__lock, __pshared);
+}
+
+__extern_inline int
+pthread_spin_lock (pthread_spinlock_t *__lock)
+{
+  return __pthread_spin_lock (__lock);
+}
+
+__extern_inline int
+pthread_spin_trylock (pthread_spinlock_t *__lock)
+{
+  return __pthread_spin_trylock (__lock);
+}
+
+__extern_inline int
+pthread_spin_unlock (pthread_spinlock_t *__lock)
+{
+  return __pthread_spin_unlock (__lock);
+}
+#endif
+#endif
diff --git a/sysdeps/htl/pthread.h b/sysdeps/htl/pthread.h
index 38c61e8da3..17f82e7180 100644
--- a/sysdeps/htl/pthread.h
+++ b/sysdeps/htl/pthread.h
@@ -549,42 +549,6 @@ extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
 extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
 	__nonnull ((1));
 
-# if defined __USE_EXTERN_INLINES && defined _LIBC
-
-# include <bits/spin-lock-inline.h>
-
-__extern_inline int
-pthread_spin_destroy (pthread_spinlock_t *__lock)
-{
-  return __pthread_spin_destroy (__lock);
-}
-
-__extern_inline int
-pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
-{
-  return __pthread_spin_init (__lock, __pshared);
-}
-
-__extern_inline int
-pthread_spin_lock (pthread_spinlock_t *__lock)
-{
-  return __pthread_spin_lock (__lock);
-}
-
-__extern_inline int
-pthread_spin_trylock (pthread_spinlock_t *__lock)
-{
-  return __pthread_spin_trylock (__lock);
-}
-
-__extern_inline int
-pthread_spin_unlock (pthread_spinlock_t *__lock)
-{
-  return __pthread_spin_unlock (__lock);
-}
-
-# endif /* Use extern inlines.  */
-
 #endif /* XPG6.  */