aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 4c2259f..29fc610 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -236,17 +236,8 @@ new_thread (ptid_t ptid)
tp->ptid = ptid;
tp->num = ++highest_thread_num;
-
- if (thread_list == NULL)
- thread_list = tp;
- else
- {
- struct thread_info *last;
-
- for (last = thread_list; last->next != NULL; last = last->next)
- ;
- last->next = tp;
- }
+ tp->next = thread_list;
+ thread_list = tp;
/* Nothing to follow yet. */
tp->pending_follow.kind = TARGET_WAITKIND_SPURIOUS;