Simple stackfull coroutines using ucontext
make
make clean
./main
See coroutine.h
file
Notes:
- Userspace IO stdout buffer should be disabled
setbuf(stdout, NULL)
because memory leaks detected. (Unknown why)- If userspace IO stdout buffer is disabled, make sure that
\n
is put at end of line to prevent segmentation fault.