On Sun, Mar 26, 2006 at 08:03:57PM +0200, Blaisorblade wrote:
> Code which two people aren't able to understand until two years later _wants_
> at least some comments and if possible restructuring. 

I'd say this is more of an oversight than obscure code that the author 
doesn't even understand.

> The problem is how, and
> I'm not looking at the code right now. Off the top of my head, I get only
> silly ideas, since we can't join the end of switch_to_skas() and
> fork_handler().

Yeah, I only got silly ideas too.  Probably the same ones :-)

> I didn't study softints, but setjmp() is supposed to use jmp_buf's, not
> sigjmp_buf's (I know they are (almost) equal in the glibc headers I've seen,
> but that equality is not guaranteed).

Yes, good point.  You didn't have to even look at libc headers - just
pointing at the man page is enough.

> If you don't pass 1 and INIT_JMP_REMOVE_SIGSTACK but two further defines like
> "JUMP_TO_INITIAL_THREAD" and "JUMP_BACK" (or actually meaningful names) the
> caller won't know more than it knows now. Or you can keep the callers intact
> - just by making switch_threads() and thread_wait() two inline
> wrappers.

Yup, that would work, though it probably wouldn't shrink the source -
the merged code will be less than the new function boilerplate and the
calls to it.

                                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

Reply via email to