diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-10-26 23:21:19 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-10-26 23:21:19 +0000 |
| commit | 76c77e89dddf6fcb22cdcaef73a86ffc7cf6e0dc (patch) | |
| tree | 5d7a005263919d7eeee31946489a22c66541a178 /sys | |
| parent | befc315d39470994bf54ad0987dadf247614a998 (diff) | |
mutex(9): Properly declare _mutex_init in sys/mutex.h.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/kern_mutex.c | 5 | ||||
| -rw-r--r-- | sys/kern/kern_mutex_obj.c | 6 | ||||
| -rw-r--r-- | sys/rump/librump/rumpkern/locks.c | 10 | ||||
| -rw-r--r-- | sys/sys/mutex.h | 3 |
4 files changed, 11 insertions, 13 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 0ff668f7c2f..55e7d6d3b3a 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_mutex.c,v 1.99 2022/04/09 23:46:10 riastradh Exp $ */ +/* $NetBSD: kern_mutex.c,v 1.100 2022/10/26 23:21:19 riastradh Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #define __MUTEX_PRIVATE #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.99 2022/04/09 23:46:10 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.100 2022/10/26 23:21:19 riastradh Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -348,7 +348,6 @@ mutex_abort(const char *func, size_t line, const kmutex_t *mtx, const char *msg) * sleeps - see comments in mutex_vector_enter() about releasing * mutexes unlocked. */ -void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); void _mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl, uintptr_t return_address) diff --git a/sys/kern/kern_mutex_obj.c b/sys/kern/kern_mutex_obj.c index e5335b036d2..0fb2a656f14 100644 --- a/sys/kern/kern_mutex_obj.c +++ b/sys/kern/kern_mutex_obj.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_mutex_obj.c,v 1.9 2022/04/09 23:38:33 riastradh Exp $ */ +/* $NetBSD: kern_mutex_obj.c,v 1.10 2022/10/26 23:21:19 riastradh Exp $ */ /*- * Copyright (c) 2008, 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_mutex_obj.c,v 1.9 2022/04/09 23:38:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_mutex_obj.c,v 1.10 2022/10/26 23:21:19 riastradh Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -87,7 +87,6 @@ kmutex_t * mutex_obj_alloc(kmutex_type_t type, int ipl) { struct kmutexobj *mo; - extern void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); mo = pool_cache_get(mutex_obj_cache, PR_WAITOK); _mutex_init(&mo->mo_lock, type, ipl, @@ -106,7 +105,6 @@ kmutex_t * mutex_obj_tryalloc(kmutex_type_t type, int ipl) { struct kmutexobj *mo; - extern void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); mo = pool_cache_get(mutex_obj_cache, PR_NOWAIT); if (__predict_true(mo != NULL)) { diff --git a/sys/rump/librump/rumpkern/locks.c b/sys/rump/librump/rumpkern/locks.c index 7f8f4dcdb65..146972828a0 100644 --- a/sys/rump/librump/rumpkern/locks.c +++ b/sys/rump/librump/rumpkern/locks.c @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.81 2020/02/22 21:44:51 ad Exp $ */ +/* $NetBSD: locks.c,v 1.82 2022/10/26 23:21:20 riastradh Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.81 2020/02/22 21:44:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.82 2022/10/26 23:21:20 riastradh Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -103,11 +103,11 @@ static lockops_t rw_lockops = { * penalty. */ -#define RUMPMTX(mtx) (*(struct rumpuser_mtx *const*)(mtx)) +#define RUMPMTX(mtx) (*(struct rumpuser_mtx *const *)(mtx)) -void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); void -_mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl, uintptr_t return_address) +_mutex_init(kmutex_t *mtx, kmutex_type_t type, int ipl, + uintptr_t return_address) { int ruflags = RUMPUSER_MTX_KMUTEX; int isspin; diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index 43b751e5afa..be91a15fa5f 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.25 2020/01/01 21:34:39 ad Exp $ */ +/* $NetBSD: mutex.h,v 1.26 2022/10/26 23:21:20 riastradh Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc. @@ -185,6 +185,7 @@ void mutex_wakeup(kmutex_t *); #ifdef _KERNEL +void _mutex_init(kmutex_t *, kmutex_type_t, int, uintptr_t); void mutex_init(kmutex_t *, kmutex_type_t, int); void mutex_destroy(kmutex_t *); |
