Skip to content

Commit 05f7f81

Browse files
[libc] Revert #73704 and subsequent fixes #73984, #74026
The test cases of mincore require getting correct page size from OS. As `sysconf` is not functioning correctly, these patches are implemented in a somewhat confusing way. We revert such patches and will reintroduce mincore after we correct sysconf. This reverts 54878b8, 985c0d1 and 418a3a4.
1 parent d24d7ed commit 05f7f81

File tree

11 files changed

+1
-227
lines changed

11 files changed

+1
-227
lines changed

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ set(TARGET_LIBC_ENTRYPOINTS
136136
libc.src.sys.mman.mprotect
137137
libc.src.sys.mman.munmap
138138
libc.src.sys.mman.posix_madvise
139-
libc.src.sys.mman.mincore
140139

141140
# sys/random.h entrypoints
142141
libc.src.sys.random.getrandom

libc/config/linux/riscv/entrypoints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ set(TARGET_LIBC_ENTRYPOINTS
142142
libc.src.sys.mman.mprotect
143143
libc.src.sys.mman.munmap
144144
libc.src.sys.mman.posix_madvise
145-
libc.src.sys.mman.mincore
146145

147146
# sys/random.h entrypoints
148147
libc.src.sys.random.getrandom

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ set(TARGET_LIBC_ENTRYPOINTS
142142
libc.src.sys.mman.mprotect
143143
libc.src.sys.mman.munmap
144144
libc.src.sys.mman.posix_madvise
145-
libc.src.sys.mman.mincore
146145

147146
# sys/random.h entrypoints
148147
libc.src.sys.random.getrandom

libc/spec/linux.td

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,7 @@ def Linux : StandardSpec<"Linux"> {
7676

7777
HeaderSpec SysMMan = HeaderSpec<
7878
"sys/mman.h",
79-
[Macro<"MAP_ANONYMOUS">],
80-
[], // Types
81-
[], // Enumerations
82-
[
83-
FunctionSpec<
84-
"mincore",
85-
RetValSpec<IntType>,
86-
[
87-
ArgSpec<VoidPtr>,
88-
ArgSpec<SizeTType>,
89-
ArgSpec<UnsignedCharPtr>,
90-
]
91-
>,
92-
] // Functions
79+
[Macro<"MAP_ANONYMOUS">]
9380
>;
9481

9582

libc/spec/spec.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def FloatType : NamedType<"float">;
4949
def DoubleType : NamedType<"double">;
5050
def LongDoubleType : NamedType<"long double">;
5151
def CharType : NamedType<"char">;
52-
def UnsignedCharType : NamedType<"unsigned char">;
5352

5453
// TODO: Add compatibility layer to use C23 type _Float128 if possible.
5554
def Float128Type : NamedType<"__float128">;
@@ -110,7 +109,6 @@ def IntPtr : PtrType<IntType>;
110109
def RestrictedIntPtr : RestrictedPtrType<IntType>;
111110
def FloatPtr : PtrType<FloatType>;
112111
def DoublePtr : PtrType<DoubleType>;
113-
def UnsignedCharPtr : PtrType<UnsignedCharType>;
114112

115113
def SigHandlerT : NamedType<"__sighandler_t">;
116114

libc/src/sys/mman/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,3 @@ add_entrypoint_object(
3636
DEPENDS
3737
.${LIBC_TARGET_OS}.posix_madvise
3838
)
39-
40-
add_entrypoint_object(
41-
mincore
42-
ALIAS
43-
DEPENDS
44-
.${LIBC_TARGET_OS}.mincore
45-
)

libc/src/sys/mman/linux/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,3 @@ add_entrypoint_object(
6161
libc.include.sys_syscall
6262
libc.src.__support.OSUtil.osutil
6363
)
64-
65-
add_entrypoint_object(
66-
mincore
67-
SRCS
68-
mincore.cpp
69-
HDRS
70-
../mincore.h
71-
DEPENDS
72-
libc.include.sys_mman
73-
libc.include.sys_syscall
74-
libc.src.__support.OSUtil.osutil
75-
libc.src.errno.errno
76-
)

libc/src/sys/mman/linux/mincore.cpp

Lines changed: 0 additions & 28 deletions
This file was deleted.

libc/src/sys/mman/mincore.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

libc/test/src/sys/mman/linux/CMakeLists.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,3 @@ add_libc_unittest(
6262
libc.src.sys.mman.posix_madvise
6363
libc.test.UnitTest.ErrnoSetterMatcher
6464
)
65-
66-
add_libc_unittest(
67-
mincore_test
68-
SUITE
69-
libc_sys_mman_unittests
70-
SRCS
71-
mincore_test.cpp
72-
DEPENDS
73-
libc.include.sys_mman
74-
libc.src.errno.errno
75-
libc.src.sys.mman.mmap
76-
libc.src.sys.mman.munmap
77-
libc.src.sys.mman.madvise
78-
libc.src.sys.mman.mincore
79-
libc.src.unistd.sysconf
80-
libc.test.UnitTest.ErrnoSetterMatcher
81-
)

libc/test/src/sys/mman/linux/mincore_test.cpp

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)