From ab86fbb1d2866df567219904982dac61751808e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 3 Nov 1999 06:13:09 +0000 Subject: 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. --- linuxthreads_db/td_ta_new.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'linuxthreads_db/td_ta_new.c') 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; -- cgit v1.2.3