Why uml-add-tls-support-debug-check-never-works is needed
Quoted 4 lines · Blaisorblade
BUT, this context switch at the thread born is special: the thread being switched away switches to a new thread not in the body of the new thread's call to
switch_to_skas->switch_threads(), but in the body ofthread_wait()! At that point, we lose the call toarch_switch_to_skas()!
Yuck yuck yuck. Nice spotting.
There's an obvious one-line fix for this, but I wonder if we ought to try some restructuring to avoid this sort of thing in the future.
Quoted 4 lines
Questions and notes:
*) Why does
arch/um/os-Linux/skas/process.chas still onesiglongjmp()call andsigjmp_bufvars, and that has no comments?
I'm tempted to say that I just missed the call somehow. I see no reason for that to be different, especially since it's preceded by a UML_SIGSETJMP. As for the sigjmp_buf variables, I don't get your point. Those haven't changed.
Quoted 2 lines
*) Also, why
thread_waitandthread_switchare almost identical, yet they're two different functions?
switch_threads? In order to merge them, you'd have to pass in the 1 and the INIT_JMP_REMOVE_SIGSTACK, which I have conceptual problems with. First, that makes the callers know things that they probably shouldn't. Second, the 1 and the INIT_JMP_REMOVE_SIGSTACK have completely different meanings. One is a message to the initial thread that it has to do something. The 1 is a message to setjmp that is has been longjmp-ed to.
Quoted 2 lines
*) Btw, the naming sucks - if I find better names for
new_thread,new_thread_procand such, would they be accepted?
Sure, good names are always appreciated.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel