aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2025-09-05 16:00:05 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2025-09-05 16:00:05 +0000
commit306f0c4cf1a2f58a56993d29d666b4643326493b (patch)
tree1d384a6e8023821c89c697bdc6cd5ab8419cca4b
parent3c3686b3c773131243d204b4096e484037c7b502 (diff)
sx: Sprinkle const qualifiers where appropriate
No functional change intended. MFC after: 2 weeks
-rw-r--r--sys/kern/kern_sx.c4
-rw-r--r--sys/sys/sx.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index accea5d288eb..c005e112d3b9 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -222,9 +222,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 deb277decc75..d28cae9d01e5 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);