adding user space tasks
Posted: Mon May 09, 2005 10:20 pm
ok i have kernel threads working pretty well and have been trying to move onto user space threads. Basically my problem boils down to this. I use the software context switching to switch tasks and I would like to simply be able to create a thread structure in memory with user space segments and such and just add it to my scheduler but obviously it isn't that simple. I tried to setup my equivalent to "longjmp" in a way that it would put the user space esp/ss on the fake iret stack but then i get a gpf on the iret as soon as i spin up any tasks (kernel or user mode).
I imagine the issue stems from the fact that ring0->ring0 irets aren't supposed to have ss3/esp3 pushed on the iret stack.
so...what do i do? should i have 2 "longjmp" functions one for changing ring level one for not? Is this even my problem in it's entirety?
any advice woudl be very much appreciated
proxy
I imagine the issue stems from the fact that ring0->ring0 irets aren't supposed to have ss3/esp3 pushed on the iret stack.
so...what do i do? should i have 2 "longjmp" functions one for changing ring level one for not? Is this even my problem in it's entirety?
any advice woudl be very much appreciated
proxy