git: 629d42653584 - stable/14 - sx: Sprinkle const qualifiers where appropriate
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 27 Sep 2025 15:14:09 UTC
The branch stable/14 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=629d42653584af5c1a05e2f012b62338de92f523
commit 629d42653584af5c1a05e2f012b62338de92f523
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-09-05 16:00:05 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-09-27 15:11:39 +0000
sx: Sprinkle const qualifiers where appropriate
No functional change intended.
MFC after: 2 weeks
(cherry picked from commit 306f0c4cf1a2f58a56993d29d666b4643326493b)
---
sys/kern/kern_sx.c | 4 ++--
sys/sys/sx.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index 0422e6804459..c8a8ceef3b93 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -223,9 +223,9 @@ owner_sx(const struct lock_object *lock, struct thread **owner)
#endif
void
-sx_sysinit(void *arg)
+sx_sysinit(const void *arg)
{
- struct sx_args *sargs = arg;
+ const struct sx_args *sargs = arg;
sx_init_flags(sargs->sa_sx, sargs->sa_desc, sargs->sa_flags);
}
diff --git a/sys/sys/sx.h b/sys/sys/sx.h
index 798e85ed67dc..9a7efaf73807 100644
--- a/sys/sys/sx.h
+++ b/sys/sys/sx.h
@@ -99,7 +99,7 @@
* Function prototipes. Routines that start with an underscore are not part
* of the public interface and are wrappered with a macro.
*/
-void sx_sysinit(void *arg);
+void sx_sysinit(const void *arg);
#define sx_init(sx, desc) sx_init_flags((sx), (desc), 0)
void sx_init_flags(struct sx *sx, const char *description, int opts);
void sx_destroy(struct sx *sx);