Protothreads are a extremely lightweight, stackless threads designed for use in severely memory constrained systems such as embedded systems. Software for memory constrained embedded systems sometimes are based on an event-driven model rather than on multi-threading. While event-driven systems allow for reduced memory usage, they require programs to be developed as explicit state machines. Since implementing programs as explicit state machines is hard, developing, maintaining, and debugging programs for event-driven systems is difficult. Protothreads simplify implementation of high-level functionality on top of event-driven systems, without significantly increasing the memory requirements. Protothreads can be implemented in in the C programming language using 10 lines of code and 2 bytes of RAM per protothread.