diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-11-03 06:13:09 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-11-03 06:13:09 +0000 |
commit | ab86fbb1d2866df567219904982dac61751808e5 (patch) | |
tree | 7ef290b73205d2a02ca808b585984d6c562857b0 /linuxthreads_db/td_ta_new.c | |
parent | dbd3e8629f6efb51bcddbd9e85ab87c0dd95a6ee (diff) | |
download | glibc-ab86fbb1d2866df567219904982dac61751808e5.zip glibc-ab86fbb1d2866df567219904982dac61751808e5.tar.gz glibc-ab86fbb1d2866df567219904982dac61751808e5.tar.bz2 |
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.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/linuxthreads_db/td_ta_new.c b/linuxthreads_db/td_ta_new.c index eeaf0cb..65535f8 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; |