Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ddb deal with the proc_lock mutex.
details: https://anonhg.NetBSD.org/src/rev/c3b332cf9132
branches: trunk
changeset: 771756:c3b332cf9132
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 02 23:57:58 2011 +0000
description:
deal with the proc_lock mutex.
diffstat:
sys/ddb/db_xxx.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r e254897e21b5 -r c3b332cf9132 sys/ddb/db_xxx.c
--- a/sys/ddb/db_xxx.c Fri Dec 02 22:28:47 2011 +0000
+++ b/sys/ddb/db_xxx.c Fri Dec 02 23:57:58 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_xxx.c,v 1.64 2011/06/12 03:35:51 rmind Exp $ */
+/* $NetBSD: db_xxx.c,v 1.65 2011/12/02 23:57:58 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.64 2011/06/12 03:35:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.65 2011/12/02 23:57:58 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_kgdb.h"
@@ -106,8 +106,11 @@
db_error("?\n");
/*NOTREACHED*/
}
-
+ /* We might stop when the mutex is held or when not */
+ t = mutex_tryenter(proc_lock);
p = proc_find((pid_t)pid);
+ if (t)
+ mutex_exit(proc_lock);
if (p == NULL) {
db_error("no such proc\n");
/*NOTREACHED*/
Home |
Main Index |
Thread Index |
Old Index