[libc-commits] [PATCH] D135286: [libc][Obvious] Add "__" prefix to sched_getcpucount in the spec and elsewhere.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Oct 5 10:15:52 PDT 2022


sivachandra created this revision.
sivachandra added a reviewer: michaelrj.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
sivachandra requested review of this revision.

Without this fix, the declaration in sched.h will not have the "__" prefix and
will cause a compile failure.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135286

Files:
  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


Index: libc/test/src/sched/CMakeLists.txt
===================================================================
--- libc/test/src/sched/CMakeLists.txt
+++ libc/test/src/sched/CMakeLists.txt
@@ -28,6 +28,6 @@
     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
 )
Index: libc/src/sched/linux/CMakeLists.txt
===================================================================
--- libc/src/sched/linux/CMakeLists.txt
+++ libc/src/sched/linux/CMakeLists.txt
@@ -25,7 +25,7 @@
 )
 
 add_entrypoint_object(
-  sched_getcpucount
+  __sched_getcpucount
   SRCS
     sched_getcpucount.cpp
   HDRS
Index: libc/src/sched/CMakeLists.txt
===================================================================
--- libc/src/sched/CMakeLists.txt
+++ libc/src/sched/CMakeLists.txt
@@ -17,8 +17,8 @@
 )
 
 add_entrypoint_object(
-  sched_getcpucount
+  __sched_getcpucount
   ALIAS
   DEPENDS
-    .${LIBC_TARGET_OS}.sched_getcpucount
+    .${LIBC_TARGET_OS}.__sched_getcpucount
 )
Index: libc/spec/llvm_libc_ext.td
===================================================================
--- libc/spec/llvm_libc_ext.td
+++ libc/spec/llvm_libc_ext.td
@@ -40,7 +40,7 @@
       [], // Enumerations
       [
         FunctionSpec<
-            "sched_getcpucount",
+            "__sched_getcpucount",
             RetValSpec<IntType>,
             [ArgSpec<SizeTType>, ArgSpec<ConstCpuSetPtr>]
         >,
Index: libc/config/linux/x86_64/entrypoints.txt
===================================================================
--- libc/config/linux/x86_64/entrypoints.txt
+++ libc/config/linux/x86_64/entrypoints.txt
@@ -336,7 +336,7 @@
     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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135286.465449.patch
Type: text/x-patch
Size: 1976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20221005/69565179/attachment-0001.bin>


More information about the libc-commits mailing list