Skip to content

Instantly share code, notes, and snippets.

@ahappyforest
Created September 11, 2014 10:14
Show Gist options
  • Save ahappyforest/df33f94ef458f3c9492b to your computer and use it in GitHub Desktop.
Save ahappyforest/df33f94ef458f3c9492b to your computer and use it in GitHub Desktop.
在tinyos中, call command和signal event只是异步的基础设施, 当call command以及signal event时, 事实上该command和event是被同步调用的。 真正的异步是通过中断做的。
在tinyos中存在两条线, 一条是同步, 一条是异步, 中断和同步代码的通信是通过task进行的。
在中断中, 你可以直接signal async event, 但是如果对实时性没有要求, 可以在中断中用task。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment