Giter VIP home page Giter VIP logo

protothreads's Introduction

Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems such as small embedded systems or sensor network nodes. Protothreads can be used with or without an underlying operating system.

Protothreads provides a blocking context on top of an event-driven system, without the overhead of per-thread stacks. The purpose of protothreads is to implement sequential flow of control without complex state machines or full multi-threading.

Main features:

* No machine specific code - the protothreads library is pure C
* Does not use error-prone functions such as longjmp()
* Very small RAM overhead - only two bytes per protothread
* Can be used with or without an OS
* Provides blocking wait without full multi-threading or
  stack-switching
* Freely available under a BSD-like open source license    

Example applications:

* Memory constrained systems
* Event-driven protocol stacks
* Small embedded systems
* Sensor network nodes

The protothreads library is released under an open source BSD-style license that allows for both non-commercial and commercial usage. The only requirement is that credit is given.

The protothreads library was written by Adam Dunkels [email protected] with support from Oliver Schmidt [email protected].

More information and new versions can be found at the protothreads homepage: http://www.sics.se/~adam/pt/

Documentation can be found in the doc/ subdirectory.

Two example programs illustrating the use of protothreads can be found in this directory:

example-small.c A small example showing how to use protothreads example-buffer.c The bounded buffer problem with protothreads example-codelock.c A code lock with simulated key input

To compile the examples, simply run "make".

Adam Dunkels, 3 June 2006

protothreads's People

Contributors

shixiongfei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.