diff options
author | julian <julian@FreeBSD.org> | 1997-02-05 23:26:09 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1997-02-05 23:26:09 +0000 |
commit | c2f7c3e4893b6b5c4494d549b3645e06664bc1b1 (patch) | |
tree | b2e6d3017e236268263978b585f2150cd10b1689 /lib/libkse/thread/thr_info.c | |
parent | 321f03c8eddd8cf5aa81836ff1932a74156d30cb (diff) | |
download | FreeBSD-src-c2f7c3e4893b6b5c4494d549b3645e06664bc1b1.zip FreeBSD-src-c2f7c3e4893b6b5c4494d549b3645e06664bc1b1.tar.gz |
Submitted by: John Birrell
uthreads update from the author.
Diffstat (limited to 'lib/libkse/thread/thr_info.c')
-rw-r--r-- | lib/libkse/thread/thr_info.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_info.c b/lib/libkse/thread/thr_info.c index e69145f..be25d45 100644 --- a/lib/libkse/thread/thr_info.c +++ b/lib/libkse/thread/thr_info.c @@ -87,8 +87,8 @@ _thread_dump_info(void) if (thread_info[j].state == pthread->state) break; /* Output a record for the current thread: */ - sprintf(s, "--------------------\nThread %p prio %3d state %s\n", - pthread, pthread->pthread_priority, thread_info[j].name); + sprintf(s, "--------------------\nThread %p prio %3d state %s [%s:%d]\n", + pthread, pthread->pthread_priority, thread_info[j].name,pthread->fname,pthread->lineno); _thread_sys_write(fd, s, strlen(s)); /* Check if this is the running thread: */ @@ -107,6 +107,9 @@ _thread_dump_info(void) switch (pthread->state) { /* File descriptor read lock wait: */ case PS_FDLR_WAIT: + case PS_FDLW_WAIT: + case PS_FDR_WAIT: + case PS_FDW_WAIT: /* Write the lock details: */ sprintf(s, "fd %d[%s:%d]", pthread->data.fd.fd, pthread->data.fd.fname, pthread->data.fd.branch); _thread_sys_write(fd, s, strlen(s)); @@ -140,11 +143,15 @@ _thread_dump_info(void) */ for (pthread = _thread_dead; pthread != NULL; pthread = pthread->nxt) { /* Output a record for the current thread: */ - sprintf(s, "Thread %p prio %3d\n", pthread, pthread->pthread_priority); + sprintf(s, "Thread %p prio %3d [%s:%d]\n", pthread, pthread->pthread_priority,pthread->fname,pthread->lineno); _thread_sys_write(fd, s, strlen(s)); } } + /* Output a header for file descriptors: */ + strcpy(s, "\n\n=============\nFILE DESCRIPTOR TABLE\n\n"); + _thread_sys_write(fd, s, strlen(s)); + /* Enter a loop to report file descriptor lock usage: */ for (i = 0; i < _thread_dtablesize; i++) { /* |