# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#ordering
# List of configuration files provided by this package - update when any new config file is added!
-%define config_files block cpu heart memory proc swap vip-process
+%define config_files block cpu cpu-sched heart memory proc swap vip-process
for i in %{confdir}/*.conf; do
if [ "$i" = %{confdir}/"*.conf" ]; then
%{confdir}/configs/config-block.conf
%{confdir}/configs/config-heart.conf
%{confdir}/configs/config-cpu.conf
+%{confdir}/configs/config-cpu-sched.conf
%if %{?mem_stress} == ON
%files mem-stress
IF("${CPU_MODULE}" STREQUAL "ON")
INSTALL(FILES ${CPU_SOURCE_DIR}/cpu.conf
DESTINATION ${RD_CONFIG_PATH} RENAME cpu.conf)
+ INSTALL(FILES ${CPU_SOURCE_DIR}/cpu-sched.conf
+ DESTINATION ${RD_CONFIG_PATH} RENAME cpu-sched.conf)
ENDIF()
IF("${VIP_AGENT}" STREQUAL "ON")
--- /dev/null
+#include <stdio.h>
+#include "module.h"
+#include "macro.h"
+#include "resourced.h"
+
+static int cpu_sched_init(void *data)
+{
+ _D("cpu-sched: init module");
+ return RESOURCED_ERROR_NONE;
+}
+
+static int cpu_sched_finalize(void *data)
+{
+ _D("cpu-sched: deinit module");
+ return RESOURCED_ERROR_NONE;
+}
+
+static struct module_ops cpu_sched_modules_ops = {
+ .priority = MODULE_PRIORITY_NORMAL,
+ .name = "cpu-sched",
+ .init = cpu_sched_init,
+ .exit = cpu_sched_finalize,
+};
+
+MODULE_REGISTER(&cpu_sched_modules_ops)