diff options
Diffstat (limited to 'mach')
-rw-r--r-- | mach/lock-intern.h | 9 | ||||
-rw-r--r-- | mach/mutex-solid.c | 7 |
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 |