This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [non-stop] 01/10 Add "executing" property


Pedro Alves wrote:

> +
> +/* Reports if thread PTID is executing. Â*/
> +extern int is_executing (ptid_t ptid);

I know if follows is_running, introduced by me, but I think this is not
the best interface. Say, somewhere later in this patch series we have
this function:

        static int
        proceed_thread_callback (struct thread_info *thread, void *arg)
        {
          if (!is_stopped (thread->ptid))
          ....

Here, we already have thread_info, and using ptid to search for thread
again, and get its state seems not nice. How about:

        extern int is_executing (struct thread_info *thread);
        extern int is_executing_ptid (ptid_t ptid);

and a similar change for is_running?

- Volodya





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]