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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
919 B
C++
Raw Normal View History

/** Linux specific real-time optimizations
*
* @see: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base
* @file
* @author Steffen Vogel <post@steffenvogel.de>
2022-03-15 09:05:42 -04:00
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
2022-05-19 17:40:10 +02:00
* @license Apache License 2.0
*********************************************************************************/
#pragma once
#include <pthread.h>
2018-08-27 11:12:40 +02:00
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