rt.hpp 1.53 KB
Newer Older
1
2
3
4
5
/** Linux specific real-time optimizations
 *
 * @see: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base
 * @file
 * @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
Steffen Vogel's avatar
Steffen Vogel committed
6
 * @copyright 2014-2019, Institute for Automation of Complex Power Systems, EONERC
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 * @license GNU General Public License (version 3)
 *
 * VILLAScommon
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *********************************************************************************/

/** @addtogroup kernel Kernel
 * @{
 */

#pragma once

Steffen Vogel's avatar
Steffen Vogel committed
31
32
33
namespace villas {
namespace kernel {
namespace rt {
34

35
void init(int priority, int affinity);
36

37
void setAffinity(int affinity);
38

39
void setPriority(int priority);
40
41
42
43
44

/** Checks for realtime (PREEMPT_RT) patched kernel.
 *
 * See https://rt.wiki.kernel.org
 *
45
46
 * @retval true Kernel is patched.
 * @retval false Kernel is not patched.
47
 */
48
bool isPreemptible();
49

Steffen Vogel's avatar
Steffen Vogel committed
50
51
52
} // namespace villas
} // namespace kernel
} // namespace rt
53
54

/** @} */