Use p_find(addr, PFIND_LOCKED) in case the proclist_lock is held.

This commit is contained in:
ad 2006-09-06 23:58:20 +00:00
parent 8d13789c5a
commit 6c8685b2d2
10 changed files with 30 additions and 30 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.16 2005/12/11 12:16:10 christos Exp $ */
/* $NetBSD: db_trace.c,v 1.17 2006/09/06 23:58:20 ad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.16 2005/12/11 12:16:10 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.17 2006/09/06 23:58:20 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -219,7 +219,7 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
} else {
if (trace_thread) {
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.5 2005/12/11 12:16:21 christos Exp $ */
/* $NetBSD: db_trace.c,v 1.6 2006/09/06 23:58:20 ad Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.5 2005/12/11 12:16:21 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.6 2006/09/06 23:58:20 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -336,7 +336,7 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
struct user *u;
struct lwp *l;
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.10 2005/12/11 12:16:41 christos Exp $ */
/* $NetBSD: db_trace.c,v 1.11 2006/09/06 23:58:20 ad Exp $ */
/*
* Copyright (c) 2000, 2001 Ben Harris
@ -31,7 +31,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.10 2005/12/11 12:16:41 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.11 2006/09/06 23:58:20 ad Exp $");
#include <sys/proc.h>
#include <sys/user.h>
@ -109,7 +109,7 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
struct user *u;
struct lwp *l;
(*pr) ("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.48 2006/09/03 21:05:01 christos Exp $ */
/* $NetBSD: db_trace.c,v 1.49 2006/09/06 23:58:20 ad Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.48 2006/09/03 21:05:01 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.49 2006/09/06 23:58:20 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -395,7 +395,7 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
struct user *u;
struct lwp *l;
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.44 2006/07/22 06:58:17 tsutsui Exp $ */
/* $NetBSD: db_trace.c,v 1.45 2006/09/06 23:58:20 ad Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.44 2006/07/22 06:58:17 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.45 2006/09/06 23:58:20 ad Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -430,7 +430,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
struct user *u;
struct lwp *l;
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.28 2006/08/26 17:36:06 tsutsui Exp $ */
/* $NetBSD: db_trace.c,v 1.29 2006/09/06 23:58:20 ad Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.28 2006/08/26 17:36:06 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.29 2006/09/06 23:58:20 ad Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -156,7 +156,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
/* "trace/t" */
(*pr)("pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.38 2005/12/11 12:18:46 christos Exp $ */
/* $NetBSD: db_trace.c,v 1.39 2006/09/06 23:58:20 ad Exp $ */
/* $OpenBSD: db_trace.c,v 1.3 1997/03/21 02:10:48 niklas Exp $ */
/*
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.38 2005/12/11 12:18:46 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.39 2006/09/06 23:58:20 ad Exp $");
#include "opt_ppcarch.h"
@ -131,7 +131,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
struct user *u;
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.17 2006/09/04 20:09:55 scw Exp $ */
/* $NetBSD: db_trace.c,v 1.18 2006/09/06 23:58:20 ad Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.17 2006/09/04 20:09:55 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.18 2006/09/06 23:58:20 ad Exp $");
#include "opt_ddb.h"
@ -184,7 +184,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
struct proc *p;
struct lwp *l;
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.23 2005/11/14 19:11:24 uwe Exp $ */
/* $NetBSD: db_trace.c,v 1.24 2006/09/06 23:58:20 ad Exp $ */
/*
* Mach Operating System
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.23 2005/11/14 19:11:24 uwe Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.24 2006/09/06 23:58:20 ad Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -76,7 +76,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr,
struct user *u;
struct lwp *l;
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_trace.c,v 1.32 2006/06/19 08:44:45 hannken Exp $ */
/* $NetBSD: db_trace.c,v 1.33 2006/09/06 23:58:20 ad Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.32 2006/06/19 08:44:45 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.33 2006/09/06 23:58:20 ad Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -87,7 +87,7 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
struct lwp *l;
struct user *u;
(*pr)("trace: pid %d ", (int)addr);
p = pfind(addr);
p = p_find(addr, PFIND_LOCKED);
if (p == NULL) {
(*pr)("not found\n");
return;