Re:Switch a task... and stop IRQs!
Posted: Sat Sep 03, 2005 1:13 pm
Maybe you should consider implementing the stack tunneling logic at userspace, in a runtime library. You would just need a mechanism that delivers page faults to userspace handlers (the kernel space handlers have higher priority, of course). Adjusting the userspace %esp and %ebp should work without problems, then. IMHO, this mechanism fits better into a runtime library, because you could change the implementation depending on the programming language that was used, or leave it away for minimalistic ASM programmers (no offense ). At kernel level, you could do the same, if you need the mechanism there.
cheers Joe
EDIT: sorry, just noticed that I forgot about segmentation, that you mentioned you will use in your OS. Maybe my designs are 'too flat' ;D .
cheers Joe
EDIT: sorry, just noticed that I forgot about segmentation, that you mentioned you will use in your OS. Maybe my designs are 'too flat' ;D .