File tree Expand file tree Collapse file tree 9 files changed +53
-10
lines changed Expand file tree Collapse file tree 9 files changed +53
-10
lines changed Original file line number Diff line number Diff line change @@ -432,6 +432,7 @@ add_proxy_header_library(
432432 cpu_set_t.h
433433 FULL_BUILD_DEPENDS
434434 libc.include .llvm-libc-types.cpu_set_t
435+ libc.include .sched
435436)
436437
437438add_proxy_header_library(
@@ -451,3 +452,12 @@ add_proxy_header_library(
451452 libc.include .llvm-libc-types.ACTION
452453 libc.include .search
453454)
455+
456+ add_proxy_header_library(
457+ struct_sched_param
458+ HDRS
459+ struct_sched_param.h
460+ FULL_BUILD_DEPENDS
461+ libc.include .llvm-libc-types.struct_sched_param
462+ libc.include .sched
463+ )
Original file line number Diff line number Diff line change 1+ //===-- Proxy for struct sched_param --------------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ //===----------------------------------------------------------------------===//
8+
9+ #ifndef LLVM_LIBC_HDR_TYPES_STRUCT_SCHED_PARAM_H
10+ #define LLVM_LIBC_HDR_TYPES_STRUCT_SCHED_PARAM_H
11+
12+ #ifdef LIBC_FULL_BUILD
13+
14+ #include "include/llvm-libc-types/struct_sched_param.h"
15+
16+ #else // Overlay mode
17+
18+ #include <sched.h>
19+
20+ #endif // LLVM_LIBC_FULL_BUILD
21+
22+ #endif // LLVM_LIBC_HDR_TYPES_STRUCT_SCHED_PARAM_H
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ add_entrypoint_object(
55 HDRS
66 ../getcpu.h
77 DEPENDS
8- libc.include .sched
98 libc.src.__support.OSUtil.osutil
109 libc.src.errno.errno
1110)
@@ -69,9 +68,10 @@ add_entrypoint_object(
6968 HDRS
7069 ../sched_setparam.h
7170 DEPENDS
71+ libc.hdr.types.pid_t
72+ libc.hdr.types.struct_sched_param
7273 libc.include .sys_syscall
7374 libc.include .time
74- libc.include .sched
7575 libc.src.__support.OSUtil.osutil
7676 libc.src.errno.errno
7777)
@@ -83,9 +83,10 @@ add_entrypoint_object(
8383 HDRS
8484 ../sched_getparam.h
8585 DEPENDS
86+ libc.hdr.types.pid_t
87+ libc.hdr.types.struct_sched_param
8688 libc.include .sys_syscall
8789 libc.include .time
88- libc.include .sched
8990 libc.src.__support.OSUtil.osutil
9091 libc.src.errno.errno
9192)
@@ -97,9 +98,10 @@ add_entrypoint_object(
9798 HDRS
9899 ../sched_setscheduler.h
99100 DEPENDS
101+ libc.hdr.types.pid_t
102+ libc.hdr.types.struct_sched_param
100103 libc.include .sys_syscall
101104 libc.include .time
102- libc.include .sched
103105 libc.src.__support.OSUtil.osutil
104106 libc.src.errno.errno
105107)
Original file line number Diff line number Diff line change 1010#define LLVM_LIBC_SRC_SCHED_SCHED_GETPARAM_H
1111
1212#include " src/__support/macros/config.h"
13- #include < sched.h>
13+
14+ #include " hdr/types/pid_t.h"
15+ #include " hdr/types/struct_sched_param.h"
1416
1517namespace LIBC_NAMESPACE_DECL {
1618
Original file line number Diff line number Diff line change 1010#define LLVM_LIBC_SRC_SCHED_SCHED_SETPARAM_H
1111
1212#include " src/__support/macros/config.h"
13- #include < sched.h>
13+
14+ #include " hdr/types/pid_t.h"
15+ #include " hdr/types/struct_sched_param.h"
1416
1517namespace LIBC_NAMESPACE_DECL {
1618
Original file line number Diff line number Diff line change 1010#define LLVM_LIBC_SRC_SCHED_SCHED_SETSCHEDULER_H
1111
1212#include " src/__support/macros/config.h"
13- #include < sched.h>
13+
14+ #include " hdr/types/pid_t.h"
15+ #include " hdr/types/struct_sched_param.h"
1416
1517namespace LIBC_NAMESPACE_DECL {
1618
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ add_libc_unittest(
4848 SRCS
4949 getcpu_test.cpp
5050 DEPENDS
51- libc.include .sched
5251 libc.src.errno.errno
5352 libc.src.sched.getcpu
5453 libc.test .UnitTest.ErrnoCheckingTest
@@ -61,7 +60,8 @@ add_libc_unittest(
6160 SRCS
6261 param_and_scheduler_test.cpp
6362 DEPENDS
64- libc.include .sched
63+ libc.hdr.sched_macros
64+ libc.hdr.types.struct_sched_param
6565 libc.src.errno.errno
6666 libc.src.sched.sched_getscheduler
6767 libc.src.sched.sched_setscheduler
@@ -79,6 +79,7 @@ add_libc_unittest(
7979 SRCS
8080 sched_rr_get_interval_test.cpp
8181 DEPENDS
82+ libc.hdr.sched_macros
8283 libc.hdr.types.struct_timespec
8384 libc.src.errno.errno
8485 libc.src.sched.sched_getscheduler
Original file line number Diff line number Diff line change 1616#include " src/unistd/getuid.h"
1717#include " test/UnitTest/Test.h"
1818
19- #include < sched.h>
19+ #include " hdr/sched_macros.h"
20+ #include " hdr/types/struct_sched_param.h"
2021
2122// We Test:
2223// SCHED_OTHER, SCHED_FIFO, SCHED_RR
Original file line number Diff line number Diff line change 1414#include " src/unistd/getuid.h"
1515#include " test/UnitTest/Test.h"
1616
17+ #include " hdr/sched_macros.h"
1718#include " hdr/types/struct_timespec.h"
1819
1920TEST (LlvmLibcSchedRRGetIntervalTest, SmokeTest) {
You can’t perform that action at this time.
0 commit comments