Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's

more informative than "tstile".
This commit is contained in:
ad 2023-10-04 20:39:35 +00:00
parent 9b39d561f0
commit 9a587cc997
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_rwlock.c,v 1.73 2023/09/23 18:48:04 ad Exp $ */
/* $NetBSD: kern_rwlock.c,v 1.74 2023/10/04 20:39:35 ad Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020, 2023
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.73 2023/09/23 18:48:04 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.74 2023/10/04 20:39:35 ad Exp $");
#include "opt_lockdebug.h"
@ -125,7 +125,7 @@ lockops_t rwlock_lockops = {
* direct handoff. XXX To be revisited.
*/
syncobj_t rw_syncobj = {
.sobj_name = "rw",
.sobj_name = "rwlock",
.sobj_flag = SOBJ_SLEEPQ_SORTED,
.sobj_boostpri = PRI_KTHREAD,
.sobj_unsleep = turnstile_unsleep,

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_turnstile.c,v 1.51 2023/10/04 20:29:18 ad Exp $ */
/* $NetBSD: kern_turnstile.c,v 1.52 2023/10/04 20:39:35 ad Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2009, 2019, 2020, 2023
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_turnstile.c,v 1.51 2023/10/04 20:29:18 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_turnstile.c,v 1.52 2023/10/04 20:39:35 ad Exp $");
#include <sys/param.h>
#include <sys/lockdebug.h>
@ -417,7 +417,7 @@ turnstile_block(turnstile_t *ts, int q, wchan_t obj, syncobj_t *sobj)
ts->ts_waiters[q]++;
nlocks = sleepq_enter(sq, l, lock);
LOCKDEBUG_BARRIER(lock, 1);
sleepq_enqueue(sq, obj, "tstile", sobj, false);
sleepq_enqueue(sq, obj, sobj->sobj_name, sobj, false);
/*
* Disable preemption across this entire block, as we may drop