This is the mail archive of the gdb@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: A question about target_wait TARGET_WNOHANG and linux_nat_wait_1


On Tuesday 06 October 2009 17:27:22, Hui Zhu wrote:
> Thanks Pedro, I am clear with it now.
> 
> I have another question about it.
> 
> >       if (pid == -1)
> >         {
> 
> ...
>          /* And every time we have checked both:
>             In async mode, return to event loop;
>             In sync mode, suspend waiting for a SIGCHLD signal.  */
>          if (options & __WCLONE)
>            {
> 
> It just handle the "minus_one_ptid".
> 
> How did it handle the inferior_ptid?

Sorry, I don't think I understand the question, and what made
you think of inferior_ptid.  Could you elaborate?  The function
returns "minus_one_ptid" when it has nothing better to return.
infrun.c takes care of switching inferior_ptid when
needed --- see the context_switch and switch_to_thread
calls etc..

-- 
Pedro Alves


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