repo.or.cz
/
contiki-2.x.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add missing includes
[contiki-2.x.git]
/
doc
/
example-pollhandler.c
blob
1126c201e5d5ad8ca0994315998b1c7d8c2e8435
1
#include
"contiki.h"
2
3
PROCESS
(
example_pollhandler
,
"Pollhandler example"
);
4
5
static void
6
exithandler
(
void
)
7
{
8
printf
(
"Process exited
\n
"
);
9
}
10
11
static void
12
pollhandler
(
void
)
13
{
14
printf
(
"Process polled
\n
"
);
15
}
16
17
PROCESS_THREAD
(
example_pollhandler
,
ev
,
data
)
18
{
19
20
PROCESS_POLLHANDLER
(
pollhandler
());
21
PROCESS_EXITHANDLER
(
exithandler
());
22
23
PROCESS_BEGIN
();
24
25
while
(
1
) {
26
PROCESS_WAIT_EVENT
();
27
}
28
29
PROCESS_END
();
30
}