Low-memory thread implementation for embedded use: protothreads
I've stumbled across protothreads
today, which seem to be a memory-friendly, userland-only thread
implementation which is intended to be used in low-memory situations
like embedded systems. Instead of reserving space for a separate
stack for each thread, very low overhead is used. Scheduling is done
by the program using it, i.e. in userland with no additional kernel
support. The sample implementation is BSD-licensed.