作者: Adam Dunkels , Oliver Schmidt , Thiemo Voigt , Muneeb Ali
关键词:
摘要: Event-driven programming is a popular model for writing programs tiny embedded systems and sensor network nodes. While event-driven can keep the memory overhead down, it enforces state machine style which makes many difficult to write, maintain, debug. We present novel abstraction called protothreads that possible write in thread-like style, with of only two bytes per protothread. show significantly reduce complexity number widely used previously written machines. For examined majority machines could be entirely removed. In other cases states transitions was drastically decreased. With lines code reduced by one third. The execution time on order few processor cycles.