From owner-p4-projects@FreeBSD.ORG Sat Nov 20 05:00:01 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1A84C16A4D0; Sat, 20 Nov 2004 05:00:01 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E94E316A4CE for ; Sat, 20 Nov 2004 05:00:00 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B86F043D72 for ; Sat, 20 Nov 2004 05:00:00 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iAK4xVqT013415 for ; Sat, 20 Nov 2004 04:59:31 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iAK4xVDN013412 for perforce@freebsd.org; Sat, 20 Nov 2004 04:59:31 GMT (envelope-from davidxu@freebsd.org) Date: Sat, 20 Nov 2004 04:59:31 GMT Message-Id: <200411200459.iAK4xVDN013412@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 65524 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2004 05:00:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=65524 Change 65524 by davidxu@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: