[libc-commits] [libc] 3e19866 - [libc][Obvious] Add "__" prefix to sched_getcpucount in the spec and elsewhere.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Wed Oct 5 11:01:36 PDT 2022
Author: Siva Chandra Reddy
Date: 2022-10-05T18:01:13Z
New Revision: 3e1986682fd26df82268c179183e9ae536b84578
URL: https://github.com/llvm/llvm-project/commit/3e1986682fd26df82268c179183e9ae536b84578
DIFF: https://github.com/llvm/llvm-project/commit/3e1986682fd26df82268c179183e9ae536b84578.diff
LOG: [libc][Obvious] Add "__" prefix to sched_getcpucount in the spec and elsewhere.
Without this fix, the declaration in sched.h will not have the "__" prefix and
will cause a compile failure.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D135286
Added:
Modified:
libc/config/linux/x86_64/entrypoints.txt
libc/spec/llvm_libc_ext.td
libc/src/sched/CMakeLists.txt
libc/src/sched/linux/CMakeLists.txt
libc/test/src/sched/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index a1e8ea8530850..98106c71d512a 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -336,7 +336,7 @@ if(LLVM_LIBC_FULL_BUILD)
libc.src.pthread.pthread_setspecific
# sched.h entrypoints
- libc.src.sched.sched_getcpucount
+ libc.src.sched.__sched_getcpucount
# stdio.h entrypoints
libc.src.stdio.clearerr
diff --git a/libc/spec/llvm_libc_ext.td b/libc/spec/llvm_libc_ext.td
index 18b8b5f7e9831..428d5bc5fcc84 100644
--- a/libc/spec/llvm_libc_ext.td
+++ b/libc/spec/llvm_libc_ext.td
@@ -40,7 +40,7 @@ def LLVMLibcExt : StandardSpec<"llvm_libc_ext"> {
[], // Enumerations
[
FunctionSpec<
- "sched_getcpucount",
+ "__sched_getcpucount",
RetValSpec<IntType>,
[ArgSpec<SizeTType>, ArgSpec<ConstCpuSetPtr>]
>,
diff --git a/libc/src/sched/CMakeLists.txt b/libc/src/sched/CMakeLists.txt
index 0e052fdc8ed00..47d6c8fa245ed 100644
--- a/libc/src/sched/CMakeLists.txt
+++ b/libc/src/sched/CMakeLists.txt
@@ -17,8 +17,8 @@ add_entrypoint_object(
)
add_entrypoint_object(
- sched_getcpucount
+ __sched_getcpucount
ALIAS
DEPENDS
- .${LIBC_TARGET_OS}.sched_getcpucount
+ .${LIBC_TARGET_OS}.__sched_getcpucount
)
diff --git a/libc/src/sched/linux/CMakeLists.txt b/libc/src/sched/linux/CMakeLists.txt
index efef1a90110f9..2246066d7c524 100644
--- a/libc/src/sched/linux/CMakeLists.txt
+++ b/libc/src/sched/linux/CMakeLists.txt
@@ -25,7 +25,7 @@ add_entrypoint_object(
)
add_entrypoint_object(
- sched_getcpucount
+ __sched_getcpucount
SRCS
sched_getcpucount.cpp
HDRS
diff --git a/libc/test/src/sched/CMakeLists.txt b/libc/test/src/sched/CMakeLists.txt
index 02ff550bde41f..cddb574fcbc13 100644
--- a/libc/test/src/sched/CMakeLists.txt
+++ b/libc/test/src/sched/CMakeLists.txt
@@ -28,6 +28,6 @@ add_libc_unittest(
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
libc.src.sched.sched_getaffinity
- libc.src.sched.sched_getcpucount
+ libc.src.sched.__sched_getcpucount
libc.test.errno_setter_matcher
)
More information about the libc-commits
mailing list