Xenomai  3.0.8
tunables.h
1 /*
2  * Copyright (C) 2015 Philippe Gerum <rpm@xenomai.org>.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13 
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  */
18 #ifndef _COBALT_TUNABLES_H
19 #define _COBALT_TUNABLES_H
20 
21 #include <boilerplate/tunables.h>
22 #include <sys/cobalt.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 extern int __cobalt_main_prio;
29 
30 extern int __cobalt_print_bufsz;
31 
32 extern int __cobalt_print_bufcount;
33 
34 extern int __cobalt_print_syncdelay;
35 
36 static inline define_config_tunable(main_prio, int, prio)
37 {
38  __cobalt_main_prio = prio;
39 }
40 
41 static inline read_config_tunable(main_prio, int)
42 {
43  return __cobalt_main_prio;
44 }
45 
46 static inline define_config_tunable(print_buffer_size, int, size)
47 {
48  __cobalt_print_bufsz = size;
49 }
50 
51 static inline read_config_tunable(print_buffer_size, int)
52 {
53  return __cobalt_print_bufsz;
54 }
55 
56 static inline define_config_tunable(print_buffer_count, int, count)
57 {
58  __cobalt_print_bufcount = count;
59 }
60 
61 static inline read_config_tunable(print_buffer_count, int)
62 {
63  return __cobalt_print_bufcount;
64 }
65 
66 static inline define_config_tunable(print_sync_delay, int, delay_ms)
67 {
68  __cobalt_print_syncdelay = delay_ms;
69 }
70 
71 static inline read_config_tunable(print_sync_delay, int)
72 {
73  return __cobalt_print_syncdelay;
74 }
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif /* !_COBALT_TUNABLES_H */