Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys mutex(9): Properly declare _mutex_init in sys/mutex.h.
details: https://anonhg.NetBSD.org/src/rev/2beb376bf4bf
branches: trunk
changeset: 372057:2beb376bf4bf
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Oct 26 23:21:19 2022 +0000
description:
mutex(9): Properly declare _mutex_init in sys/mutex.h.
diffstat:
sys/kern/kern_mutex.c | 5 ++---
sys/kern/kern_mutex_obj.c | 6 ++----
sys/rump/librump/rumpkern/locks.c | 10 +++++-----
sys/sys/mutex.h | 3 ++-
4 files changed, 11 insertions(+), 13 deletions(-)
diffs (110 lines):
diff -r 0a9d99e786a4 -r 2beb376bf4bf sys/kern/kern_mutex.c
--- a/sys/kern/kern_mutex.c Wed Oct 26 23:21:06 2022 +0000
+++ b/sys/kern/kern_mutex.c Wed Oct 26 23:21:19 2022 +0000
@@ -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 @@
* 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 -r 0a9d99e786a4 -r 2beb376bf4bf sys/kern/kern_mutex_obj.c
--- a/sys/kern/kern_mutex_obj.c Wed Oct 26 23:21:06 2022 +0000
+++ b/sys/kern/kern_mutex_obj.c Wed Oct 26 23:21:19 2022 +0000
@@ -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 @@
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 @@
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 -r 0a9d99e786a4 -r 2beb376bf4bf sys/rump/librump/rumpkern/locks.c
--- a/sys/rump/librump/rumpkern/locks.c Wed Oct 26 23:21:06 2022 +0000
+++ b/sys/rump/librump/rumpkern/locks.c Wed Oct 26 23:21:19 2022 +0000
@@ -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 @@
* 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 -r 0a9d99e786a4 -r 2beb376bf4bf sys/sys/mutex.h
--- a/sys/sys/mutex.h Wed Oct 26 23:21:06 2022 +0000
+++ b/sys/sys/mutex.h Wed Oct 26 23:21:19 2022 +0000
@@ -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 @@
#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 *);
Home |
Main Index |
Thread Index |
Old Index