Do not include defs.h or server.h in any header file
[deliverable/binutils-gdb.git] / gdb / gdbserver / gdbthread.h
index a1d9ca8101ce14870de3a300a24c834ba2887680..fe0a75e44d892b2c0000f50134bfd7d350d2be50 100644 (file)
 #ifndef GDB_THREAD_H
 #define GDB_THREAD_H
 
-#include "server.h"
 #include "inferiors.h"
 
 struct btrace_target_info;
 
 struct thread_info
 {
+  /* This must appear first.  See inferiors.h.
+     The list iterator functions assume it.  */
   struct inferior_list_entry entry;
+
   void *target_data;
   void *regcache_data;
 
@@ -71,11 +73,13 @@ struct thread_info
 extern struct inferior_list all_threads;
 
 void remove_thread (struct thread_info *thread);
-void add_thread (ptid_t ptid, void *target_data);
+struct thread_info *add_thread (ptid_t ptid, void *target_data);
+
+struct thread_info *get_first_thread (void);
 
 struct thread_info *find_thread_ptid (ptid_t ptid);
 
 /* Get current thread ID (Linux task ID).  */
-#define current_ptid ((struct inferior_list_entry *) current_inferior)->id
+#define current_ptid (current_inferior->entry.id)
 
 #endif /* GDB_THREAD_H */
This page took 0.024361 seconds and 4 git commands to generate.