1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

refactored kernel_is_rt() -> rt_is_preemptible()

This commit is contained in:
Steffen Vogel 2017-02-16 09:08:29 -03:00
parent 7cab0538ab
commit 8f15c76300
4 changed files with 15 additions and 15 deletions

View file

@ -20,15 +20,6 @@
*/
//int kernel_check_cap(cap_value_t cap):
/** Checks for realtime (PREEMPT_RT) patched kernel.
*
* See https://rt.wiki.kernel.org
*
* @retval 0 Kernel is patched.
* @reval <>0 Kernel is not patched.
*/
int kernel_is_rt();
/** Get kernel cmdline parameter
*
* See https://www.kernel.org/doc/Documentation/kernel-parameters.txt

View file

@ -11,3 +11,12 @@
int rt_init(int affinity, int priority);
/** Checks for realtime (PREEMPT_RT) patched kernel.
*
* See https://rt.wiki.kernel.org
*
* @retval 0 Kernel is patched.
* @reval <>0 Kernel is not patched.
*/
int rt_is_preemptible();

View file

@ -104,11 +104,6 @@ int kernel_has_version(int maj, int min)
return version_cmp(&current, &required) < 0;
}
int kernel_is_rt()
{
return access(SYSFS_PATH "/kernel/realtime", R_OK);
}
int kernel_get_cmdline_param(const char *param, char *buf, size_t len)
{
int ret;

View file

@ -18,7 +18,7 @@ int rt_init(int affinity, int priority)
int is_isol, is_rt, ret;
/* Use FIFO scheduler with real time priority */
is_rt = kernel_is_rt();
is_rt = rt_is_preemptible();
if (is_rt)
warn("We recommend to use an PREEMPT_RT patched kernel!");
@ -75,4 +75,9 @@ int rt_init(int affinity, int priority)
warn("You should use the 'affinity' setting to pin VILLASnode to dedicate CPU cores");
return 0;
}
int rt_is_preemptible()
{
return access(SYSFS_PATH "/kernel/realtime", R_OK);
}