When I was at university, I ended up writing a full-fledged,
POSIX-compatible, threading library. Motivated by an assignment to write a
threading library using the friendly BSD functions from
ucontext.h, I opted for the more interesting problem. This
resulted in wth.
The library is fully functional and is compatible with POSIX 1003.1-2001 based
operating systems. Feel free to try it out and send me feedback. If you’re
serious about using, I’d suggest breaking POSIX compliance and switching from
SIGVTALRM. This will add support for subsecond scheduling which
will make it much more responsive.