1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-16 00:00:02 +01:00
VILLASnode/common/include/villas/kernel/rt.hpp
Steffen Vogel e743b42c6f code cleanups
- Use C++ style comments
- Harmonize indentions
- Harmonize comment capitalization

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-02-29 18:58:07 +01:00

36 lines
928 B
C++

/** Linux specific real-time optimizations
*
* @see: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base
* @file
* @author Steffen Vogel <svogel2@eonerc.rwth-aachen.de>
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
* @license Apache License 2.0
*********************************************************************************/
#pragma once
#include <pthread.h>
namespace villas {
namespace kernel {
namespace rt {
void init(int priority, int affinity);
void setProcessAffinity(int affinity);
void setThreadAffinity(pthread_t thread, int affinity);
void setPriority(int priority);
/** Checks for realtime (PREEMPT_RT) patched kernel.
*
* See https://rt.wiki.kernel.org
*
* @retval true Kernel is patched.
* @retval false Kernel is not patched.
*/
bool isPreemptible();
} // namespace villas
} // namespace kernel
} // namespace rt