I have been tasked in a class to create a user level thread library in C. I was wondering if anyone could give me a list of things to read up on to accomplish this. I have a good idea as to where to start, but any resources on user level threads and some applicable aspects of the C language that might help would be extremely valuable.
I am very unclear as to how I would implement a scheduler for such. Assume that I have a pretty good understanding of the C language and some of its more helpful library functions.
jmp_bufare documented on your system, you can save & restore all the context you need by wrappingsetjmp/longjmp. I’ve done it. (The code has gone to the great/dev/nullin the sky, though, so I can’t point to it. ☹)