summaryrefslogtreecommitdiff
path: root/linuxthreads_db/td_ta_map_id2thr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-15 23:37:22 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-15 23:37:22 +0000
commit706d1dee4692cc5419275fcddc4518933ff2a39e (patch)
treec795b0e8236092f2345ac7803181e41c13c5427c /linuxthreads_db/td_ta_map_id2thr.c
parentc3da4f0cba685e6918d2babb286bd731ae7eab71 (diff)
Update.
2002-07-15 Ulrich Drepper <drepper@redhat.com> * libio/wfileops.c (_IO_wfile_seekoff): Reposition wide pointers and adjust state for seek position. [PR libc/4070] * libio/Makefile (tests): Add bug-rewind. * libio/bug-rewind.c: New file.
Diffstat (limited to 'linuxthreads_db/td_ta_map_id2thr.c')
-rw-r--r--linuxthreads_db/td_ta_map_id2thr.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/linuxthreads_db/td_ta_map_id2thr.c b/linuxthreads_db/td_ta_map_id2thr.c
index e6be74ff19..ddeb2d3c4a 100644
--- a/linuxthreads_db/td_ta_map_id2thr.c
+++ b/linuxthreads_db/td_ta_map_id2thr.c
@@ -45,7 +45,19 @@ td_ta_map_id2thr (const td_thragent_t *ta, pthread_t pt, td_thrhandle_t *th)
/* Test whether this entry is in use. */
if (phc.h_descr == NULL)
- return TD_BADTH;
+ {
+ if (pt % pthread_threads_max == 0)
+ {
+ /* The initial thread always exists but the thread library
+ might not yet be initialized. */
+ th->th_ta_p = (td_thragent_t *) ta;
+ th->th_unique = NULL;
+
+ return TD_OK;
+ }
+
+ return TD_BADTH;
+ }
/* Next test: get the descriptor to see whether this is not an old
thread handle. */