ddb: Constify db_syncobj_owner argument.

No need for it to be writable, and the actual type of the struct lwp
member is const.
This commit is contained in:
riastradh 2023-10-15 10:27:25 +00:00
parent fac91bbe0f
commit 5a1f45c803
3 changed files with 8 additions and 8 deletions

View File

@ -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 have_addr,
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)] = "";

View File

@ -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,v 1.2 2023/07/12 12:50:46 riastradh Exp
#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_;

View File

@ -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 */