Hi, I want to perform user-level scheduling in Genode. Previously we used the POSIX ucontext APIs to save the thread's state, create a new context, and swap between contexts.
Before I try to put the equivalent in place in Genode, I am wondering if there are any existing facilities to do this sort of thing in user-space.
Also any advice on approach is welcome.
Thanks Daniel
Hello again,
there is no ready-to-use user-level threading package for Genode. I don't really know how it would match with your use case, but it might be worthwhile to take a look at the Protothread project of Adam Dunkels (of lwIP fame)?
http://code.google.com/p/protothread/ http://code.google.com/p/protothread/wiki/UsersGuide
Even though I have no practical experience with it, I find this approach intriguing, especially if considering its low complexity.
Best regards Norman
Hi Norman, Protothreads won't really work for us since this is comparable to our own technology that we are trying to port (basically a Cilk-like compiler and runtime).
It's quite easy to implement the stack swapping and context saving we need - I just didn't want to reinvent the wheel.
Thanks Daniel