From f7a8a904b6ac4883f11d93a267dae6ebeda441b8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 12 Nov 1999 23:11:22 +0000 Subject: Update. 1999-11-12 Ulrich Drepper * charmaps/ISO-8859-13: Fix a few entries. Patch by Marius Gedminas . --- linuxthreads_db/ChangeLog | 3 +++ linuxthreads_db/td_ta_thr_iter.c | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'linuxthreads_db') diff --git a/linuxthreads_db/ChangeLog b/linuxthreads_db/ChangeLog index 5721a01..32b06d0 100644 --- a/linuxthreads_db/ChangeLog +++ b/linuxthreads_db/ChangeLog @@ -1,5 +1,8 @@ 1999-11-12 Ulrich Drepper + * td_ta_thr_iter.c: Fix loop starting point over all but main and + manager thread. + * td_ta_thr_iter.c: Read descriptors for main and manager thread special since after this we can assume that no new threads will be created anymore (at least in the gdb implementation). diff --git a/linuxthreads_db/td_ta_thr_iter.c b/linuxthreads_db/td_ta_thr_iter.c index 8cb8c63..5b31651 100644 --- a/linuxthreads_db/td_ta_thr_iter.c +++ b/linuxthreads_db/td_ta_thr_iter.c @@ -30,11 +30,6 @@ handle_descr (const td_thragent_t *ta, td_thr_iter_f *callback, size_t sizeof_descr = ta->sizeof_descr; td_thrhandle_t th; -#ifdef ALL_THREADS_STOPPED - /* First count this active thread. */ - --num; -#endif - if (ps_pdread (ta->ph, descr, &pds, sizeof_descr) != PS_OK) return TD_ERR; /* XXX Other error value? */ @@ -129,9 +124,14 @@ td_ta_thr_iter (const td_thragent_t *ta, td_thr_iter_f *callback, #endif /* Now get all descriptors, one after the other. */ - for (cnt = 0; cnt < pthread_threads_max && num > 0; ++cnt) + for (cnt = 2; cnt < pthread_threads_max && num > 0; ++cnt) if (phc[cnt].h_descr != NULL) { +#ifdef ALL_THREADS_STOPPED + /* First count this active thread. */ + --num; +#endif + result = handle_descr (ta, callback, cbdata_p, state, ti_pri, cnt, phc[cnt].h_descr); if (result != TD_OK) -- cgit v1.1