Question about the kernel thread in UML TT mode
Quoted 22 lines · Alex LIU
Quoted 6 lines · Jeff
Quoted 2 lines
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?Quoted 5 lines
Quoted 3 lines
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...
Quoted 8 lines
Then I have another question:
In UML function
new_thread_handler, the current sigcontext is defined as following:UPT_SC(¤t->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.
Signature · 17 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 4 lines · Blaisorblade
Quoted 1 line
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.
Officially, it's the sigcontext structure.
Jeff
-------------------------------------------------------
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel