3 ms·
My favorite example of that are "protothreads", stackless "threads" in C introduced by Adam Dunkel, and related with the contiki project. An implementation of
by enqk 17y ago
My favorite example of that are "protothreads", stackless "threads" in C introduced by Adam Dunkel, and related with the contiki project.
An implementation of the paper can be done in a 130 lines big header, and they conveniently replace state machines with straightforward sequential code.
http://www.sics.se/~adam/pt/ http://www.sics.se/~adam/pt/