summary refs log tree commit diff
path: root/linuxthreads_db/td_ta_new.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-03 06:13:09 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-03 06:13:09 +0000
commitab86fbb1d2866df567219904982dac61751808e5 (patch)
tree7ef290b73205d2a02ca808b585984d6c562857b0 /linuxthreads_db/td_ta_new.c
parentdbd3e8629f6efb51bcddbd9e85ab87c0dd95a6ee (diff)
downloadglibc-ab86fbb1d2866df567219904982dac61751808e5.tar.gz
glibc-ab86fbb1d2866df567219904982dac61751808e5.tar.xz
glibc-ab86fbb1d2866df567219904982dac61751808e5.zip
Update.
	* internals.h: Declare __pthread_last_event.
	* manager.c: Define __pthread_last_event.
	(pthread_handle_create): Set __pthread_last_event.
	(pthread_exited): Likewise.
	* join.c (pthread_exit): Likewise.
Diffstat (limited to 'linuxthreads_db/td_ta_new.c')
-rw-r--r--linuxthreads_db/td_ta_new.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/linuxthreads_db/td_ta_new.c b/linuxthreads_db/td_ta_new.c
index eeaf0cbf51..65535f8d14 100644
--- a/linuxthreads_db/td_ta_new.c
+++ b/linuxthreads_db/td_ta_new.c
@@ -51,15 +51,29 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
   /* Remember the address.  */
   (*ta)->pthread_threads_eventsp = (td_thr_events_t *) addr;
 
-  /* See whether the library contains the necessary symbols.  */
-  if (ps_pglobal_lookup (ps, LIBPTHREAD_SO, "__pthread_handles",
-		         &addr) != PS_OK)
+  /* Get the pointer to the variable pointing to the thread descriptor
+     with the last event.  */
+  if (ps_pglobal_lookup (ps, LIBPTHREAD_SO,
+			 "__pthread_last_event",
+			 &(*ta)->pthread_last_event) != PS_OK)
     {
     free_return:
       free (*ta);
       return TD_ERR;
     }
 
+  /* Get the pointer to the variable containing the number of active
+     threads.  */
+  if (ps_pglobal_lookup (ps, LIBPTHREAD_SO,
+			 "__pthread_handles_num",
+			 &(*ta)->pthread_handles_num) != PS_OK)
+    goto free_return;
+
+  /* See whether the library contains the necessary symbols.  */
+  if (ps_pglobal_lookup (ps, LIBPTHREAD_SO, "__pthread_handles",
+		         &addr) != PS_OK)
+    goto free_return;
+
   (*ta)->handles = (struct pthread_handle_struct *) addr;