PERFORCE change 65524 for review
David Xu
davidxu at FreeBSD.org
Fri Nov 19 21:00:01 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=65524
Change 65524 by davidxu at davidxu_alona on 2004/11/20 04:59:06
Fix info dumpping.
Affected files ...
.. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_info.c#2 edit
Differences ...
==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_info.c#2 (text+ko) ====
@@ -56,12 +56,8 @@
/* Static variables: */
static const struct s_thread_info thread_info[] = {
{PS_RUNNING , "Running"},
- {PS_LOCKWAIT , "Waiting on an internal lock"},
{PS_MUTEX_WAIT , "Waiting on a mutex"},
{PS_COND_WAIT , "Waiting on a condition variable"},
- {PS_SLEEP_WAIT , "Sleeping"},
- {PS_SIGSUSPEND , "Suspended, waiting for a signal"},
- {PS_SIGWAIT , "Waiting for a signal"},
{PS_JOIN , "Waiting to join"},
{PS_SUSPENDED , "Suspended"},
{PS_DEAD , "Dead"},
@@ -147,10 +143,10 @@
/* Output a record for the thread: */
snprintf(s, sizeof(s),
"--------------------\n"
- "Thread %p (%s), scope %s, prio %3d, blocked %s, state %s [%s:%d]\n",
+ "Thread %p (%s), scope %s, prio %3d, state %s [%s:%d]\n",
pthread, (pthread->name == NULL) ? "" : pthread->name,
pthread->attr.flags & PTHREAD_SCOPE_SYSTEM ? "system" : "process",
- pthread->active_priority, (pthread->blocked != 0) ? "yes" : "no",
+ pthread->active_priority,
thread_info[i].name, pthread->fname, pthread->lineno);
__sys_write(fd, s, strlen(s));
@@ -170,27 +166,6 @@
/* Process according to thread state: */
switch (pthread->state) {
- case PS_SIGWAIT:
- snprintf(s, sizeof(s), "sigmask (hi) ");
- __sys_write(fd, s, strlen(s));
- for (i = _SIG_WORDS - 1; i >= 0; i--) {
- snprintf(s, sizeof(s), "%08x ",
- pthread->sigmask.__bits[i]);
- __sys_write(fd, s, strlen(s));
- }
- snprintf(s, sizeof(s), "(lo)\n");
- __sys_write(fd, s, strlen(s));
-
- snprintf(s, sizeof(s), "waitset (hi) ");
- __sys_write(fd, s, strlen(s));
- for (i = _SIG_WORDS - 1; i >= 0; i--) {
- snprintf(s, sizeof(s), "%08x ",
- pthread->data.sigwait->waitset->__bits[i]);
- __sys_write(fd, s, strlen(s));
- }
- snprintf(s, sizeof(s), "(lo)\n");
- __sys_write(fd, s, strlen(s));
- break;
/*
* Trap other states that are not explicitly
* coded to dump information:
More information about the p4-projects
mailing list