- struct thread_info *new_thread = xmalloc (sizeof (*new_thread));
-
- memset (new_thread, 0, sizeof (*new_thread));
-
- new_thread->entry.id = thread_id;
-
- add_inferior_to_list (&all_threads, & new_thread->entry);
-
- if (current_inferior == NULL)
- current_inferior = new_thread;
-
- new_thread->target_data = target_data;
- set_inferior_regcache_data (new_thread, new_register_cache ());
- new_thread->gdb_id = gdb_id;