From 9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 14 Nov 2020 23:35:35 +0000 Subject: hurd: Remove some remnants of cthreads Libc has actually been using mach's lock-internal.h mutex for a long time already. --- mach/lock-intern.h | 9 +++++++++ mach/mutex-solid.c | 7 +++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'mach') 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 @@ . */ #include -#include -/* 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 -- cgit 1.4.1