+/* Marks thread PTID is running, or stopped.
+ If PIDGET (PTID) is -1, marks all threads. */
+extern void set_running (ptid_t ptid, int running);
+
+/* Marks or clears thread(s) PTID as having been requested to stop.
+ If PTID is MINUS_ONE_PTID, applies to all threads. If
+ ptid_is_pid(PTID) is true, applies to all threads of the process
+ pointed at by PTID. If STOP, then the THREAD_STOP_REQUESTED
+ observer is called with PTID as argument. */
+extern void set_stop_requested (ptid_t ptid, int stop);
+
+/* NOTE: Since the thread state is not a boolean, most times, you do
+ not want to check it with negation. If you really want to check if
+ the thread is stopped,
+
+ use (good):
+
+ if (is_stopped (ptid))
+
+ instead of (bad):
+
+ if (!is_running (ptid))
+
+ The latter also returns true on exited threads, most likelly not
+ what you want. */
+
+/* Reports if in the frontend's perpective, thread PTID is running. */
+extern int is_running (ptid_t ptid);
+
+/* Is this thread listed, but known to have exited? We keep it listed
+ (but not visible) until it's safe to delete. */
+extern int is_exited (ptid_t ptid);
+
+/* In the frontend's perpective, is this thread stopped? */
+extern int is_stopped (ptid_t ptid);
+
+/* In the frontend's perpective is there any thread running? */
+extern int any_running (void);
+
+/* Marks thread PTID as executing, or not. If PIDGET (PTID) is -1,
+ marks all threads.
+
+ Note that this is different from the running state. See the
+ description of state_ and executing_ fields of struct
+ thread_info. */
+extern void set_executing (ptid_t ptid, int executing);
+
+/* Reports if thread PTID is executing. */
+extern int is_executing (ptid_t ptid);
+
+/* Merge the executing property of thread PTID over to its thread
+ state property (frontend running/stopped view).
+
+ "not executing" -> "stopped"
+ "executing" -> "running"
+ "exited" -> "exited"
+
+ If PIDGET (PTID) is -1, go over all threads.
+
+ Notifications are only emitted if the thread state did change. */
+extern void finish_thread_state (ptid_t ptid);
+
+/* Same as FINISH_THREAD_STATE, but with an interface suitable to be
+ registered as a cleanup. PTID_P points to the ptid_t that is
+ passed to FINISH_THREAD_STATE. */
+extern void finish_thread_state_cleanup (void *ptid_p);
+