Linked by Thom Holwerda on Mon 5th Jun 2006 18:15 UTC, submitted by Adam Dunkels
General Development Protothreads are an extremely lightweight, stackless, thread-like programming abstraction designed for severely memory constrained embedded systems that may have as little as a few hundred bytes of RAM. Protothreads are designed to replace event-driven C code with sequential programming but without the memory overhead of full multithreading - a protothread requires only two bytes of RAM. Protothreads are implemented in ANSI C, does not require any machine code, and is therefore highly portable. Version 1.3 adds the possibility to determine if a protothread is blocked, has yielded or has ended, and can be downloaded here. Also be sure to read how protothreads work, under the hood.
Thread beginning with comment 131263
To read all comments associated with this story, please click here.
Weird and dangerous !
by Kochise on Wed 7th Jun 2006 08:31 UTC
Member since:

The C language sadly allows various ways to write it, especially multiple instructions per line (this is NOT like assembler which allows only one instruction per line). My boss and some of my collegues have exactly this f--king habitude to write several things 'belonging to the same statement' on the same line. Now imagine multiple nested PT_WAIT_UNTIL on the same line... How the hell are you finding the bug ?


Reply Score: 1