|
|
|
|
|
by geofft
3815 days ago
|
|
Cool! A co-TA and I ported the concurrency library in JOS, MIT's teaching operating system, to regular UNIX: https://github.com/geofft/vireo It uses the standard-ish library functions setcontext and getcontext to avoid an assembly dependency. ("POSIX.1-2008 removes the specification of getcontext(), citing portability issues, and recommending that applications be rewritten to use POSIX threads instead.") |
|
BTW makecontext and friend were made obsolete by posix for a technicality: makecontext signature isn't expressible any longer in a strictly conforming C99 applications, although in practice it will work with any C compiler.
Ironically this happened around the same time that coroutines started becoming popular again.