Module Name:    src
Committed By:   riastradh
Date:           Sun Oct 15 10:27:25 UTC 2023

Modified Files:
        src/sys/ddb: db_command.c db_syncobj.c db_syncobj.h

Log Message:
ddb: Constify db_syncobj_owner argument.

No need for it to be writable, and the actual type of the struct lwp
member is const.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/ddb/db_command.c
cvs rdiff -u -r1.2 -r1.3 src/sys/ddb/db_syncobj.c src/sys/ddb/db_syncobj.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.187 src/sys/ddb/db_command.c:1.188
--- src/sys/ddb/db_command.c:1.187	Fri Oct 13 19:07:08 2023
+++ src/sys/ddb/db_command.c	Sun Oct 15 10:27:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.187 2023/10/13 19:07:08 ad Exp $	*/
+/*	$NetBSD: db_command.c,v 1.188 2023/10/15 10:27:25 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009, 2019
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.187 2023/10/13 19:07:08 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.188 2023/10/15 10:27:25 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -1401,7 +1401,7 @@ db_show_all_tstiles(db_expr_t addr, bool
 			const char *wmesg = NULL;
 			char wmesgbuf[sizeof("tstile")] = "";
 			lwpid_t lid = -1;
-			struct syncobj *sobj = NULL;
+			const struct syncobj *sobj = NULL;
 			struct lwp *owner = NULL;
 			char sobjname[sizeof(sobj->sobj_name)] = "";
 

Index: src/sys/ddb/db_syncobj.c
diff -u src/sys/ddb/db_syncobj.c:1.2 src/sys/ddb/db_syncobj.c:1.3
--- src/sys/ddb/db_syncobj.c:1.2	Wed Jul 12 12:50:46 2023
+++ src/sys/ddb/db_syncobj.c	Sun Oct 15 10:27:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_syncobj.c,v 1.2 2023/07/12 12:50:46 riastradh Exp $	*/
+/*	$NetBSD: db_syncobj.c,v 1.3 2023/10/15 10:27:25 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 #define	__RWLOCK_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_syncobj.c,v 1.2 2023/07/12 12:50:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_syncobj.c,v 1.3 2023/10/15 10:27:25 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: db_syncobj.c
 #include <ddb/ddb.h>
 
 struct lwp *
-db_syncobj_owner(struct syncobj *sobj, wchan_t wchan)
+db_syncobj_owner(const struct syncobj *sobj, wchan_t wchan)
 {
 	db_expr_t mutex_syncobj_;
 	db_expr_t rw_syncobj_;
Index: src/sys/ddb/db_syncobj.h
diff -u src/sys/ddb/db_syncobj.h:1.2 src/sys/ddb/db_syncobj.h:1.3
--- src/sys/ddb/db_syncobj.h:1.2	Sun Oct 15 10:27:11 2023
+++ src/sys/ddb/db_syncobj.h	Sun Oct 15 10:27:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_syncobj.h,v 1.2 2023/10/15 10:27:11 riastradh Exp $	*/
+/*	$NetBSD: db_syncobj.h,v 1.3 2023/10/15 10:27:25 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -34,6 +34,6 @@
 struct lwp;
 struct syncobj;
 
-struct lwp *db_syncobj_owner(struct syncobj *, wchan_t);
+struct lwp *db_syncobj_owner(const struct syncobj *, wchan_t);
 
 #endif	/* _DDB_DB_SYNCOBJ_H */

Reply via email to