git: 79720e10b208 - stable/14 - rwlock: Sprinkle const qualifiers where appropriate
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 Sep 2025 15:14:08 UTC
The branch stable/14 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=79720e10b20849db722a62f14444745a53afda06
commit 79720e10b20849db722a62f14444745a53afda06
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-09-05 16:00:04 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-09-27 15:11:38 +0000
rwlock: Sprinkle const qualifiers where appropriate
No functional change intended.
MFC after: 2 weeks
(cherry picked from commit 3c3686b3c773131243d204b4096e484037c7b502)
---
sys/kern/kern_rwlock.c | 4 ++--
sys/sys/rwlock.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index dc2b9892cecd..46bc0c94a6d5 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -252,9 +252,9 @@ _rw_destroy(volatile uintptr_t *c)
}
void
-rw_sysinit(void *arg)
+rw_sysinit(const void *arg)
{
- struct rw_args *args;
+ const struct rw_args *args;
args = arg;
rw_init_flags((struct rwlock *)args->ra_rw, args->ra_desc,
diff --git a/sys/sys/rwlock.h b/sys/sys/rwlock.h
index 0ebe90e09bed..929f78c1d204 100644
--- a/sys/sys/rwlock.h
+++ b/sys/sys/rwlock.h
@@ -128,7 +128,7 @@
*/
void _rw_init_flags(volatile uintptr_t *c, const char *name, int opts);
void _rw_destroy(volatile uintptr_t *c);
-void rw_sysinit(void *arg);
+void rw_sysinit(const void *arg);
int _rw_wowned(const volatile uintptr_t *c);
void _rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line);
int __rw_try_wlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF);