One other thing that I've looked at but never used is Adam Dunkels' "protothreads" (http://dunkels.com/adam/pt/) although you'd still need to roll your own channel library.

On Thu, Jul 9, 2015 at 10:50 AM, Steve Simon <steve@quintile.net> wrote:
The system I am trying to add libtask to has no runtime other than libc.

Corrently it is an even based system that uses a "min main loop" and
a twisty maze of nested state machines that all look the same.

Hence my desire to add co-routines + channels (i.e. exactly what libtask is)
to it. I have no need for the file or network modules but those are easily removed.

I don't have the context calls but I do have setjmp/longjmp so that is what I
am trying to use.

I will shout if it works out.

-Steve