Module Name: src Committed By: christos Date: Fri Dec 2 23:57:59 UTC 2011
Modified Files: src/sys/ddb: db_xxx.c Log Message: deal with the proc_lock mutex. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/ddb/db_xxx.c 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_xxx.c diff -u src/sys/ddb/db_xxx.c:1.64 src/sys/ddb/db_xxx.c:1.65 --- src/sys/ddb/db_xxx.c:1.64 Sat Jun 11 23:35:51 2011 +++ src/sys/ddb/db_xxx.c Fri Dec 2 18:57:58 2011 @@ -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_kill_proc(db_expr_t addr, bool haddr, 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*/