]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: move missing_sched.h -> include/sched.h 37960/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Jun 2025 21:16:14 +0000 (06:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Jul 2025 03:29:15 +0000 (12:29 +0900)
18 files changed:
src/analyze/analyze-security.c
src/basic/argv-util.c
src/basic/include/sched.h [moved from src/basic/missing_sched.h with 84% similarity]
src/basic/memfd-util.c
src/basic/missing_syscall.h
src/basic/namespace-util.c
src/basic/process-util.c
src/basic/raw-clone.h
src/core/exec-invoke.c
src/journal/journalctl-filter.c
src/nsresourced/nsresourcework.c
src/nsresourced/test-userns-restrict.c
src/shared/nsflags.h
src/shared/nsresource.c
src/test/test-argv-util.c
src/test/test-process-util.c
src/test/test-raw-clone.c
src/test/test-seccomp.c

index e0d313dcec425f3646662217f2c2c36a97fa1b49..ba544ba1e5b904b75caf8f01974ebbb5aa964b36 100644 (file)
@@ -20,7 +20,6 @@
 #include "format-table.h"
 #include "in-addr-prefix-util.h"
 #include "manager.h"
-#include "missing_sched.h"
 #include "mkdir.h"
 #include "nulstr-util.h"
 #include "parse-util.h"
index ab0fe3280d4c4d401970d18fe4436067961f5a5a..214c4b61f9a6a4d714d091c4f91c7eda58cf113f 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sched.h>
 #include <stdlib.h>
 #include <sys/mman.h>
 #include <sys/prctl.h>
@@ -8,7 +9,6 @@
 #include "capability-util.h"
 #include "errno-util.h"
 #include "log.h"
-#include "missing_sched.h"
 #include "parse-util.h"
 #include "path-util.h"
 #include "process-util.h"
similarity index 84%
rename from src/basic/missing_sched.h
rename to src/basic/include/sched.h
index c14162be59af9a6df7d234a50f4054183e155e80..13eb8d059e6650edeac20e9be50e3697043bc083 100644 (file)
@@ -5,23 +5,22 @@
  * to make struct sched_attr being defined.
  * Note, this must be included before sched.h, otherwise the headers conflict with each other. */
 #include <linux/sched/types.h>
-#include <sched.h>       /* IWYU pragma: export */
 
-#include "forward.h"
+#include_next <sched.h>
 
 /* 769071ac9f20b6a447410c7eaa55d1a5233ef40c (5.8),
  * defined in sched.h since glibc-2.36. */
 #ifndef CLONE_NEWTIME
 #  define CLONE_NEWTIME 0x00000080
 #else
-assert_cc(CLONE_NEWTIME == 0x00000080);
+_Static_assert(CLONE_NEWTIME == 0x00000080, "");
 #endif
 
 /* Not exposed yet. Defined at include/linux/sched.h */
 #ifndef PF_KTHREAD
 #  define PF_KTHREAD 0x00200000
 #else
-assert_cc(PF_KTHREAD == 0x00200000);
+_Static_assert(PF_KTHREAD == 0x00200000, "");
 #endif
 
 /* The maximum thread/process name length including trailing NUL byte. This mimics the kernel definition of
@@ -32,5 +31,5 @@ assert_cc(PF_KTHREAD == 0x00200000);
 #ifndef TASK_COMM_LEN
 #  define TASK_COMM_LEN 16
 #else
-assert_cc(TASK_COMM_LEN == 16);
+_Static_assert(TASK_COMM_LEN == 16, "");
 #endif
index a7adab2bfa2cd87bed20956d87ad3eb6e90720f9..3257c1b9dd4b0c8fbdbf962fc183fb75b8c3dd0e 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sched.h>
 #include <stdio.h>
 #include <sys/prctl.h>
 #include <sys/stat.h>
@@ -9,7 +10,6 @@
 #include "errno-util.h"
 #include "fd-util.h"
 #include "memfd-util.h"
-#include "missing_sched.h"
 #include "string-util.h"
 #include "utf8.h"
 
index ec62602989dfbfca1fe76b5d0eea748b68adb470..76074d1c0497dcb156c7480ce0f6203fa1e1e168 100644 (file)
@@ -4,6 +4,7 @@
 /* Missing glibc definitions to access certain kernel APIs */
 
 #include <linux/mempolicy.h>
+#include <sched.h>
 #include <signal.h>
 #include <sys/syscall.h>
 #include <sys/xattr.h>
@@ -15,7 +16,6 @@
 
 #include "forward.h"
 #include "missing_keyctl.h"
-#include "missing_sched.h"
 #include "missing_syscall_def.h"
 
 /* ======================================================================= */
index bed67619e2d2a45241e7431e33ec80940b32ca02..35a8693cb1c5fcd560ef36770308983f4ffbeebd 100644 (file)
@@ -11,7 +11,6 @@
 #include "log.h"
 #include "missing_magic.h"
 #include "missing_namespace.h"
-#include "missing_sched.h"
 #include "mountpoint-util.h"
 #include "namespace-util.h"
 #include "parse-util.h"
index e05329b4069f275c5889dff2f2c3d9ea339e7dd5..1d341aa0a7e937a19c12c993bb9f2493fa850e48 100644 (file)
@@ -34,7 +34,6 @@
 #include "locale-util.h"
 #include "log.h"
 #include "memory-util.h"
-#include "missing_sched.h"
 #include "missing_syscall.h"
 #include "mountpoint-util.h"
 #include "namespace-util.h"
index 91b0069fb5b7d1a4bd045c5554533449f0b3390c..36202cc0ba4b41128928703f9374ce9e87c35f2e 100644 (file)
@@ -11,7 +11,6 @@
 
 #include "log.h"
 #include "macro.h"
-#include "missing_sched.h"
 #include "process-util.h"
 
 /**
index ec6729ae37b823740b10af71f0cd42099a208313..a73f87279fb35f053a3a4d8ca8752bc5b5ccd4ba 100644 (file)
@@ -52,7 +52,6 @@
 #include "journal-send.h"
 #include "manager.h"
 #include "memfd-util.h"
-#include "missing_sched.h"
 #include "missing_syscall.h"
 #include "mkdir-label.h"
 #include "mount-util.h"
index d29237e43b58cc86f19e957b183534775ab1b0a0..54a54d105c59a18bb896e1dc0a5cf9e596828e5c 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sched.h>
+
 #include "sd-device.h"
 #include "sd-journal.h"
 
@@ -14,7 +16,6 @@
 #include "journalctl-util.h"
 #include "log.h"
 #include "logs-show.h"
-#include "missing_sched.h"
 #include "path-util.h"
 #include "set.h"
 #include "stat-util.h"
index 3ec575ac48f16b41b7f68c2ee34260e6265bfdce..7157106c0863e1734d95012943044e82616b8f1a 100644 (file)
@@ -30,7 +30,6 @@
 #include "json-util.h"
 #include "main-func.h"
 #include "missing_magic.h"
-#include "missing_sched.h"
 #include "missing_syscall.h"
 #include "mountpoint-util.h"
 #include "namespace-util.h"
index e4741784f24104a28f458b0b48c2942dffc3e4a7..68ac3e47220794bbfd08f1363e73a8ff970689a6 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sched.h>
 #include <sys/eventfd.h>
 #include <sys/mount.h>
 #include <sys/stat.h>
@@ -9,7 +10,6 @@
 #include "fd-util.h"
 #include "log.h"
 #include "main-func.h"
-#include "missing_sched.h"
 #include "namespace-util.h"
 #include "process-util.h"
 #include "rm-rf.h"
index 1bb46d3d3cd67f50d399d136343c00708813576c..35bcb6a8c99bcfe7d184abe4e4c651da855dbaeb 100644 (file)
@@ -1,8 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include <sched.h>
+
 #include "forward.h"
-#include "missing_sched.h"
 
 /* The combination of all namespace flags defined by the kernel. The right type for this isn't clear. setns() and
  * unshare() expect these flags to be passed as (signed) "int", while clone() wants them as "unsigned long". The latter
index e74e5fcc700ed4c9a7c4b399607ecd62a8b07897..d199d437d5ff280c174729165e61ef6d4498e121 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sched.h>
 #include <sys/prctl.h>
 
 #include "sd-varlink.h"
@@ -9,7 +10,6 @@
 #include "format-util.h"
 #include "json-util.h"
 #include "log.h"
-#include "missing_sched.h"
 #include "namespace-util.h"
 #include "nsresource.h"
 #include "process-util.h"
index 4a3ac700ac5ff0497cf5433d0a0de5260319d8c1..f7a99ff26d94d116b21d38ddc1b7cb4ba9196fbf 100644 (file)
@@ -8,7 +8,6 @@
 #endif
 
 #include "argv-util.h"
-#include "missing_sched.h"
 #include "process-util.h"
 #include "tests.h"
 #include "virt.h"
index 376b20b04848083148ac25148b9fb616997175f8..5cc185973b48e94fd8b4f83dff45cc3e9df0e18b 100644 (file)
@@ -26,7 +26,6 @@
 #include "fd-util.h"
 #include "ioprio-util.h"
 #include "log.h"
-#include "missing_sched.h"
 #include "namespace-util.h"
 #include "parse-util.h"
 #include "pidfd-util.h"
index 097bbfe29aaaf29acf60622155a3038b7331ce6b..3a0da73b82dd86f54cb3ecd3ff1d3fb34aad3bb5 100644 (file)
@@ -5,7 +5,6 @@
 
 #include "errno-util.h"
 #include "format-util.h"
-#include "missing_sched.h"
 #include "raw-clone.h"
 #include "tests.h"
 
index 9acb558d402fb08c4a5d1a46c4ccb9d30f97224b..7199b2fb33bdb08b49a21d3f259057efdcb4e86e 100644 (file)
@@ -21,7 +21,6 @@
 #include "fileio.h"
 #include "fs-util.h"
 #include "memory-util.h"
-#include "missing_sched.h"
 #include "missing_syscall.h"
 #include "nsflags.h"
 #include "nulstr-util.h"