summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_info.c')
-rw-r--r--lib/libpthread/thread/thr_info.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_info.c b/lib/libpthread/thread/thr_info.c
index e69145f..be25d45 100644
--- a/lib/libpthread/thread/thr_info.c
+++ b/lib/libpthread/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++) {
/*
OpenPOWER on IntegriCloud