The branch main has been updated by zlei:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7bbfcc540810ba08f75b8f04263bb9a25f1cf45e

commit 7bbfcc540810ba08f75b8f04263bb9a25f1cf45e
Author:     Zhenlei Huang <z...@freebsd.org>
AuthorDate: 2025-09-05 16:00:04 +0000
Commit:     Zhenlei Huang <z...@freebsd.org>
CommitDate: 2025-09-05 16:00:04 +0000

    mtx: Sprinkle const qualifiers where appropriate
    
    No functional change intended.
    
    MFC after:      2 weeks
---
 sys/kern/kern_mutex.c | 4 ++--
 sys/sys/mutex.h       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index f952b3fc8805..8b5908f5219a 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -1136,9 +1136,9 @@ __mtx_assert(const volatile uintptr_t *c, int what, const 
char *file, int line)
  * General init routine used by the MTX_SYSINIT() macro.
  */
 void
-mtx_sysinit(void *arg)
+mtx_sysinit(const void *arg)
 {
-       struct mtx_args *margs = arg;
+       const struct mtx_args *margs = arg;
 
        mtx_init((struct mtx *)margs->ma_mtx, margs->ma_desc, NULL,
            margs->ma_opts);
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 56c03a1b0be9..08d4e2d28b33 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -91,7 +91,7 @@
 void   _mtx_init(volatile uintptr_t *c, const char *name, const char *type,
            int opts);
 void   _mtx_destroy(volatile uintptr_t *c);
-void   mtx_sysinit(void *arg);
+void   mtx_sysinit(const void *arg);
 int    _mtx_trylock_flags_int(struct mtx *m, int opts LOCK_FILE_LINE_ARG_DEF);
 int    _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file,
            int line);

Reply via email to