about summary refs log tree commit diff
path: root/mach
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-14 23:35:35 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-15 13:16:03 +0100
commit9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d (patch)
tree2d6a3d3036c0ddf314a09163619a0639359e72ed /mach
parent7ed2b6921feb51d3fecdd0b72e8ab7a7f37ba4ae (diff)
downloadglibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.tar.gz
glibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.tar.xz
glibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.zip
hurd: Remove some remnants of cthreads
Libc has actually been using mach's lock-internal.h mutex for a long
time already.
Diffstat (limited to 'mach')
-rw-r--r--mach/lock-intern.h9
-rw-r--r--mach/mutex-solid.c7
2 files changed, 12 insertions, 4 deletions
diff --git a/mach/lock-intern.h b/mach/lock-intern.h
index b6a075bc3a..a68674cef4 100644
--- a/mach/lock-intern.h
+++ b/mach/lock-intern.h
@@ -95,6 +95,15 @@ __spin_lock_locked (__spin_lock_t *__lock)
 #endif
 
 /* Name space-clean internal interface to mutex locks.  */
+struct mutex {
+	__spin_lock_t __held;
+	__spin_lock_t __lock;
+	const char *__name;
+	void *__head, *__tail;
+	void *__holder;
+};
+
+#define MUTEX_INITIALIZER { __SPIN_LOCK_INITIALIZER }
 
 /* Initialize the newly allocated mutex lock LOCK for further use.  */
 extern void __mutex_init (void *__lock);
diff --git a/mach/mutex-solid.c b/mach/mutex-solid.c
index 7ed9ce8c28..13c01fb511 100644
--- a/mach/mutex-solid.c
+++ b/mach/mutex-solid.c
@@ -17,11 +17,10 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <lock-intern.h>
-#include <cthreads.h>
 
-/* If cthreads is linked in, it will define these functions itself to do
-   real cthreads mutex locks.  This file will only be linked in when
-   cthreads is not used, and `mutexes' are in fact just spin locks (and
+/* If pthread is linked in, it will define these functions itself to do
+   real pthread mutex locks.  This file will only be linked in when
+   pthread is not used, and `mutexes' are in fact just spin locks (and
    some unused storage).  */
 
 void