📄 readme
字号:
Protothreads are extremely lightweight stackless threads designed forseverely memory constrained systems such as small embedded systems orsensor network nodes. Protothreads can be used with or without anunderlying operating system.Protothreads provides a blocking context on top of an event-drivensystem, without the overhead of per-thread stacks. The purpose ofprotothreads is to implement sequential flow of control withoutcomplex 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 nodesThe protothreads library is released under an open source BSD-stylelicense that allows for both non-commercial and commercial usage. Theonly requirement is that credit is given.The protothreads library was written by Adam Dunkels <adam@sics.se>with support from Oliver Schmidt <ol.sc@web.de>.More information and new versions can be found at the protothreadshomepage: http://www.sics.se/~adam/pt/Documentation can be found in the doc/ subdirectory.Two example programs illustrating the use of protothreads can be foundin 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 inputTo compile the examples, simply run "make".Adam Dunkels, 3 June 2006
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -