summaryrefslogtreecommitdiffstats
path: root/src/basic/missing_sched.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:34 +0000
commit67497cedb2f732b3445ecdc0d09b881f9c69f852 (patch)
treeb7197679acca419c7ddc0300873e19141d5fae3e /src/basic/missing_sched.h
parentAdding debian version 256.1-2. (diff)
downloadsystemd-67497cedb2f732b3445ecdc0d09b881f9c69f852.tar.xz
systemd-67497cedb2f732b3445ecdc0d09b881f9c69f852.zip
Merging upstream version 256.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/basic/missing_sched.h')
-rw-r--r--src/basic/missing_sched.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/basic/missing_sched.h b/src/basic/missing_sched.h
index b8109d3..bd83b41 100644
--- a/src/basic/missing_sched.h
+++ b/src/basic/missing_sched.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
+#include <linux/types.h>
#include <sched.h>
#include "macro.h"
@@ -35,3 +36,20 @@ assert_cc(PF_KTHREAD == 0x00200000);
#else
assert_cc(TASK_COMM_LEN == 16);
#endif
+
+#if !HAVE_STRUCT_SCHED_ATTR
+struct sched_attr {
+ __u32 size; /* Size of this structure */
+ __u32 sched_policy; /* Policy (SCHED_*) */
+ __u64 sched_flags; /* Flags */
+ __s32 sched_nice; /* Nice value (SCHED_OTHER,
+ SCHED_BATCH) */
+ __u32 sched_priority; /* Static priority (SCHED_FIFO,
+ SCHED_RR) */
+ /* Remaining fields are for SCHED_DEADLINE
+ and potentially soon for SCHED_OTHER/SCHED_BATCH */
+ __u64 sched_runtime;
+ __u64 sched_deadline;
+ __u64 sched_period;
+};
+#endif