On Thursday 19 May 2005 11:57, Alex LIU wrote:
> On May 18, 2005 9:31 PM, Jeff wrote:
> >> But P and Q are different threads and they will be scheduled
> >> differently,right?

> > No, they're two different ways of looking at the same thread.  They're
> > scheduled somewhat differently, but that's just reflecting the two ways
> > of

> looking at it.  If it's runnable on the host, it's runnable inside UML, but
> not the other way around.

> Then how does the UML thread interact with its corresponding host thread in
> TT mode? Also use the switch_pipe?

> >> And in the function outer_tramp, the thread A see the thread B was
> >> stopped with a SIGSTOP signal. Why? Since the thread B is blocked by
> >> the signal SIGUSR1...

> > The handler calls suspend_new_thread, which stops itself.

> Exactly! I'm wrong...

> Then I have another question:

> In UML function new_thread_handler, the current sigcontext is defined as
> following:

>       UPT_SC(&current->thread.regs.regs) = (void *) (&sig + 1);

> Why? What does "&sig + 1" mean?
I think that's because sig is on the stack, and &sig + 1 points to the datas 
saved by the kernel when entering the signal handler, i.e. the registers of 
the caller, saved to be restored on return.
-- 
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to