Module Name: src
Committed By: rmind
Date: Sat May 16 23:59:57 UTC 2009
Modified Files:
src/usr.sbin/schedctl: schedctl.c
Log Message:
Skip LSIDL and LSZOMB threads when retrieving info.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/schedctl/schedctl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/schedctl/schedctl.c
diff -u src/usr.sbin/schedctl/schedctl.c:1.13 src/usr.sbin/schedctl/schedctl.c:1.14
--- src/usr.sbin/schedctl/schedctl.c:1.13 Sun Jan 18 10:18:32 2009
+++ src/usr.sbin/schedctl/schedctl.c Sat May 16 23:59:56 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: schedctl.c,v 1.13 2009/01/18 10:18:32 lukem Exp $ */
+/* $NetBSD: schedctl.c,v 1.14 2009/05/16 23:59:56 rmind Exp $ */
/*
* Copyright (c) 2008, Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: schedctl.c,v 1.13 2009/01/18 10:18:32 lukem Exp $");
+__RCSID("$NetBSD: schedctl.c,v 1.14 2009/05/16 23:59:56 rmind Exp $");
#endif
#include <stdio.h>
@@ -165,6 +165,8 @@
for (lwp = lwp_list, i = 0; i < count; lwp++, i++) {
if (lid && lid != lwp->l_lid)
continue;
+ if (lwp->l_stat == LSIDL || lwp->l_stat == LSZOMB)
+ continue;
thread_info(pid, lwp->l_lid);
}
kvm_close(kd);