同步操作将从 vjiot/Protothreads 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system to provide blocking event-handlers. Protothreads provide sequential flow of control without complex state machines or full multi-threading.
#include "pt.h"
struct pt pt;
struct timer timer;
PT_THREAD(example(struct pt *pt))
{
PT_BEGIN(pt);
while(1) {
if(initiate_io()) {
timer_start(&timer);
PT_WAIT_UNTIL(pt,
io_completed() ||
timer_expired(&timer));
read_data();
}
}
PT_END(pt);
}
While protothreads originally were created for memory-constrained embedded systems, it has found many uses as a general purpose library too. Examples include multimedia streaming server software, grid computing research software, and MPEG decoding software for Internet TVs.
[Read more...](./About Protothreads.md)
For example usages, see the Examples page.
The protothreads library is released under an open source BSD-style license that freely allows for both non-commercial and commercial usage. The only requirement is that credit is given. Download the full source code here.
Protothreads were invented by Adam Dunkels with support from Oliver Schmidt ol.sc@web.de.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。