2018-08-22 11:29:39 +02:00
|
|
|
/** 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>
|
2020-01-20 17:15:25 +01:00
|
|
|
* @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
|
2018-08-22 11:29:39 +02:00
|
|
|
* @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
|
|
|
|
|
2018-08-27 11:12:40 +02:00
|
|
|
namespace villas {
|
|
|
|
namespace kernel {
|
|
|
|
namespace rt {
|
2018-08-22 11:29:39 +02:00
|
|
|
|
2019-02-12 17:28:37 +01:00
|
|
|
void init(int priority, int affinity);
|
2018-08-22 11:29:39 +02:00
|
|
|
|
2019-02-12 17:28:37 +01:00
|
|
|
void setAffinity(int affinity);
|
2018-08-22 11:29:39 +02:00
|
|
|
|
2019-02-12 17:28:37 +01:00
|
|
|
void setPriority(int priority);
|
2018-08-22 11:29:39 +02:00
|
|
|
|
|
|
|
/** Checks for realtime (PREEMPT_RT) patched kernel.
|
|
|
|
*
|
|
|
|
* See https://rt.wiki.kernel.org
|
|
|
|
*
|
2019-02-12 17:28:37 +01:00
|
|
|
* @retval true Kernel is patched.
|
|
|
|
* @retval false Kernel is not patched.
|
2018-08-22 11:29:39 +02:00
|
|
|
*/
|
2019-02-12 17:28:37 +01:00
|
|
|
bool isPreemptible();
|
2018-08-22 11:29:39 +02:00
|
|
|
|
2019-05-28 10:50:50 +02:00
|
|
|
} /* namespace villas */
|
|
|
|
} /* namespace kernel */
|
|
|
|
} /* namespace rt */
|
2018-08-22 11:29:39 +02:00
|
|
|
|
|
|
|
/** @} */
|