C / C++ / C#

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
photo of David Bolton

David's C / C++ / C# Blog

By David Bolton, About.com Guide to C / C++ / C#

What is a Protothread?

Monday August 25, 2008
Protothreads is a free (BSD-style licensed for both commercial and non commercial use) highly portable library for applications in C that provides lightweight stackless threads with a minimum memory foot print (2 bytes per protothread).

Protothreads was created by Adam Dunkels at the Networked Embedded Systems group at the Swedish Institute of Computer Science. Though developed for use in embedded (and memory constrained ) systems and used in the Contiki OS (by the same author), the protothreads library works perfectly well in non-embedded applications. It provides a way to do a blocking wait without full multi-threading or stack-switching. There is a good example of it being used in a wireless sensor network- you can read about it (Note - link goes to a PDF) . I've added a link to Protothreads into the C code library.

Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss

Community Forum

Explore C / C++ / C#

About.com Special Features

C / C++ / C#

  1. Home
  2. Computing & Technology
  3. C / C++ / C#

©2009 About.com, a part of The New York Times Company.

All rights reserved.