summaryrefslogtreecommitdiff
path: root/c_src/include/linux/sched
diff options
context:
space:
mode:
Diffstat (limited to 'c_src/include/linux/sched')
-rw-r--r--c_src/include/linux/sched/clock.h0
-rw-r--r--c_src/include/linux/sched/cputime.h6
-rw-r--r--c_src/include/linux/sched/debug.h0
-rw-r--r--c_src/include/linux/sched/mm.h31
-rw-r--r--c_src/include/linux/sched/rt.h9
-rw-r--r--c_src/include/linux/sched/signal.h11
-rw-r--r--c_src/include/linux/sched/task.h0
-rw-r--r--c_src/include/linux/sched/task_stack.h0
8 files changed, 57 insertions, 0 deletions
diff --git a/c_src/include/linux/sched/clock.h b/c_src/include/linux/sched/clock.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/c_src/include/linux/sched/clock.h
diff --git a/c_src/include/linux/sched/cputime.h b/c_src/include/linux/sched/cputime.h
new file mode 100644
index 00000000..a89c626f
--- /dev/null
+++ b/c_src/include/linux/sched/cputime.h
@@ -0,0 +1,6 @@
+
+static inline void task_cputime_adjusted(struct task_struct *p, u64 *utime, u64 *stime)
+{
+ *utime = 0;
+ *stime = 0;
+}
diff --git a/c_src/include/linux/sched/debug.h b/c_src/include/linux/sched/debug.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/c_src/include/linux/sched/debug.h
diff --git a/c_src/include/linux/sched/mm.h b/c_src/include/linux/sched/mm.h
new file mode 100644
index 00000000..03feda7a
--- /dev/null
+++ b/c_src/include/linux/sched/mm.h
@@ -0,0 +1,31 @@
+#ifndef _LINUX_SCHED_MM_H
+#define _LINUX_SCHED_MM_H
+
+#define PF_MEMALLOC 0x00000800 /* Allocating memory */
+#define PF_MEMALLOC_NOFS 0x00040000 /* All allocation requests will inherit GFP_NOFS */
+
+static inline unsigned int memalloc_nofs_save(void)
+{
+ unsigned int flags = current->flags & PF_MEMALLOC_NOFS;
+ current->flags |= PF_MEMALLOC_NOFS;
+ return flags;
+}
+
+static inline void memalloc_nofs_restore(unsigned int flags)
+{
+ current->flags = (current->flags & ~PF_MEMALLOC_NOFS) | flags;
+}
+
+static inline unsigned int memalloc_noreclaim_save(void)
+{
+ unsigned int flags = current->flags & PF_MEMALLOC;
+ current->flags |= PF_MEMALLOC;
+ return flags;
+}
+
+static inline void memalloc_noreclaim_restore(unsigned int flags)
+{
+ current->flags = (current->flags & ~PF_MEMALLOC) | flags;
+}
+
+#endif /* _LINUX_SCHED_MM_H */
diff --git a/c_src/include/linux/sched/rt.h b/c_src/include/linux/sched/rt.h
new file mode 100644
index 00000000..ef3040e4
--- /dev/null
+++ b/c_src/include/linux/sched/rt.h
@@ -0,0 +1,9 @@
+#ifndef _SCHED_RT_H
+#define _SCHED_RT_H
+
+static inline int rt_task(struct task_struct *p)
+{
+ return 0;
+}
+
+#endif /* _SCHED_RT_H */
diff --git a/c_src/include/linux/sched/signal.h b/c_src/include/linux/sched/signal.h
new file mode 100644
index 00000000..20bdc050
--- /dev/null
+++ b/c_src/include/linux/sched/signal.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_SCHED_SIGNAL_H
+#define _LINUX_SCHED_SIGNAL_H
+
+static inline int fatal_signal_pending(struct task_struct *p)
+{
+ return 0;
+}
+
+#endif /* _LINUX_SCHED_SIGNAL_H */
+
diff --git a/c_src/include/linux/sched/task.h b/c_src/include/linux/sched/task.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/c_src/include/linux/sched/task.h
diff --git a/c_src/include/linux/sched/task_stack.h b/c_src/include/linux/sched/task_stack.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/c_src/include/linux/sched/task_stack.h