This series of patches implements coroutines method with sigaltstack. The flow of creation and management of the coroutines is quite similar to the coroutine-ucontext.c. The way to use sigaltstack to achieve the needed stack manipulation is done in a way quite similar to the GNU Portable Threads (file pth_mctx.c, variant 2).
This v2 has some corrections and improved patches, but it's essentially the same. At the moment, the default backend is ucontext (the former default method for coroutines). Alex Barcelo (3): coroutine: adding sigaltstack method (.c source) coroutine: adding configure choose mechanism for coroutine backend coroutine: adding configure option for sigaltstack coroutine backend Makefile.objs | 4 + configure | 41 +++++- coroutine-sigaltstack.c | 334 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 371 insertions(+), 8 deletions(-) create mode 100644 coroutine-sigaltstack.c -- 1.7.5.4