Protothreads are the building blocks of the Contiki OS which drive many wireless sensor protocol network stacks: SICSLowPAN (using uIP), Rime, and of course FreakZ, my Zigbee stack. Larry Ruane has written his own version of Protothreads, based on Adam Dunkel's original version, for Unix and includes its own protothread scheduler. Altogether, the implementation runs 400 lines of C source code and provides users with deterministic thread scheduling which can be used in many applications. What's more interesting is that the protothread implementation can be run in it's own Unix thread so you can have a protothreaded application running within a threaded application. Fun fun fun...

As an aside, Contiki OS also natively supports protothreads on x86 and can be run in Linux or Windows threads. But the more the merrier...

Here's a link to the sourceforge project:


Add comment

Security code