From: Alex L. <ale...@st...> - 2005-05-19 09:58:30
|
On May 18, 2005 9:31 PM, Jeff wrote: >> But P and Q are different threads and they will be scheduled=20 >> 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=20 >> stopped with a SIGSTOP signal. Why? Since the thread B is blocked by=20 >> 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(¤t->thread.regs.regs) =3D (void *) (&sig + 1); Why? What does "&sig + 1" mean? Thanks a lot! Alex |