Import of the contiki-2.x development code from the SICS internal CVS server

This commit is contained in:
adamdunkels 2006-06-17 22:41:10 +00:00
commit c9e808d638
671 changed files with 95332 additions and 0 deletions

30
doc/example-pollhandler.c Normal file
View file

@ -0,0 +1,30 @@
#include "contiki.h"
PROCESS(example_pollhandler, "Pollhandler example");
static void
exithandler(void)
{
printf("Process exited\n");
}
static void
pollhandler(void)
{
printf("Process polled\n");
}
PROCESS_THREAD(example_pollhandler, ev, data)
{
PROCESS_POLLHANDLER(pollhandler());
PROCESS_EXITHANDLER(exithandler());
PROCESS_BEGIN();
while(1) {
PROCESS_WAIT_EVENT();
}
PROCESS_END();
}