Date: Mon, 14 Feb 2005 22:24:50 -0800 From: "Ashwin Chandra" <ashcs@ucla.edu> To: <freebsd-hackers@freebsd.org> Subject: Kernel monitor, the return Message-ID: <000801c51327$0e2bf020$58e243a4@ash>
next in thread | raw e-mail | index | archive | help
In trying to create a simple kernel thread that prints out all the processes data and stack size, i still get a panic fault (vm_fault on no entry) at the printf statement...ive narrowed it down to the ru_idrss variable that is causing the problem, im not sure why. I thought maybe I was not locking properly or obseriving correct mutexes, but I have tried everything. If anyone knows why the fault is occurring at the printf, please let me know. =)
Ash
static void
kern_print(void)
{
struct proc *p;
sx_slock(&allproc_lock);
FOREACH_PROC_IN_SYSTEM(p) {
PROC_LOCK(p);
if(p->p_state == PRS_NORMAL)
{
PROC_LOCK(p);
printf("%d %d\n", (int)p->p_stats->p_ru.ru_isrss, (int)p->p_stats->p_ru.ru_idrss);
PROC_UNLOCK(p);
}
PROC_UNLOCK(p);
}
sx_sunlock(&allproc_lock);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000801c51327$0e2bf020$58e243a4>
