29.11.2012 Views

t - SICS

t - SICS

t - SICS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Events and Processes<br />

PROCESS_WAIT_EVENT();<br />

Waits for an event to be posted to the process<br />

PROCESS_WAIT_EVENT_UNTIL(condition c);<br />

Waits for an event to be posted to the process, with an extra condition.<br />

Often used: wait until timer has expired<br />

PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&timer));<br />

PROCESS_POST(...) and PROCESS_POST_SYNCH(..)<br />

Post (a)synchronous event to a process.<br />

The other process usually waits with<br />

PROCESS_WAIT_EVENT_UNTIL(ev == EVENTNAME);<br />

New events can just be defined e.g. #define EVENT_EX 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!