www. O S N E W S .com
News Features Interviews
BlogContact Editorials

Protothreads for UNIX
By Thom Holwerda, submitted by anonymous on 2009-01-18 11:16:41
Protothreads are a type of extremely lightweight threads - each protothread requires only two bytes of memory - that are usually used for embedded firmware programming, where memory is at a premium. Protothreads combine the low overhead with event-driven programming with the algorithmic clarity of threaded programming.

Larry Ruane from LeftHand Networks Inc. has written a protothreads library for Unix systems that, unlike Adam Dunkels' original library, contains a complete scheduler that allows several protothreads to run inside a regular thread. Ruane's protothreads are implemented in less than 400 lines of C code using gcc's labels-as-values feature. The project wiki has a thorough explanation of how protothreads work and how they are intended to be used. The open source code can be downloaded from the project's SourceForge page.

16  Comments - Printer friendly - Related stories
Recent related stories
- The case of double characters when printing man pages - 2017-08-09
- From the AT&T Archives: The UNIX Operating System - 2017-03-29
- The enviable pedigree of UNIX and POSIX - 2017-02-02
- How Unix made it to the top - 2016-12-18
- Unix in your browser tab - 2016-12-12
- More related articles

Tell a friend
Your full name:
Your email address:
Your friend's email:
Anti-spam measure:

News Features Interviews
BlogContact Editorials

WAP site - RSS feed
© OSNews LLC 1997-2007. All Rights Reserved.
The readers' comments are owned and a responsibility of whoever posted them.
Prefer the desktop version of OSNews?