]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robofsm/robodata.h
Merge branch 'maint-demo'
[eurobot/public.git] / src / robofsm / robodata.h
1 /**
2  * robodata.h                   08/04/11
3  *
4  * Multi-purpose structures and defines for robots.
5  *
6  * Copyright: (c) 2008 CTU Dragons
7  *            CTU FEE - Department of Control Engineering
8  * License: GNU GPL v.2
9  */
10
11 #ifndef ROBODATA_H
12 #define ROBODATA_H
13
14 /* robot's mode */
15 enum {
16         ROBO_COMPETING = 0,
17         ROBO_TESTING
18 };
19
20 /**
21  * FSM MACROS
22  */
23
24 /**
25  * THREAD PRIORITIES
26  */
27 #define SET_THREAD_PRIORITY(tid,prio) \
28 sched_param param; \
29 pthread_attr_t tattr; \
30 pthread_attr_init (&tattr); \
31 pthread_attr_getschedparam (&tattr, &param); \
32 param.sched_priority = prio;\
33 pthread_attr_setschedparam (&tattr, &param);
34
35 #endif  /* ROBODATA_H */