[libc] add CPU_COUNT macro and backing function
authorMichael Jones <michaelrj@google.com>
Mon, 3 Oct 2022 22:55:40 +0000 (15:55 -0700)
committerMichael Jones <michaelrj@google.com>
Tue, 4 Oct 2022 22:22:55 +0000 (15:22 -0700)
commit0b790afb06475d7c5f9b62e5bab186c01fda4ff1
tree0669e6b8104af5d720dbc1ea5f20941d2bf0ace4
parent8c02ca1da5bdcb7f7e850afb24d95bb6d82d8971
[libc] add CPU_COUNT macro and backing function

Add the macro CPU_COUNT as well as a backing function to implement the
functionality.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D135179
16 files changed:
libc/config/linux/x86_64/entrypoints.txt
libc/config/linux/x86_64/headers.txt
libc/include/CMakeLists.txt
libc/include/llvm-libc-macros/CMakeLists.txt
libc/include/llvm-libc-macros/linux/CMakeLists.txt
libc/include/llvm-libc-macros/linux/sched-macros.h [new file with mode: 0644]
libc/include/llvm-libc-macros/sched-macros.h [new file with mode: 0644]
libc/include/sched.h.def
libc/spec/gnu_ext.td
libc/spec/llvm_libc_ext.td
libc/src/sched/CMakeLists.txt
libc/src/sched/linux/CMakeLists.txt
libc/src/sched/linux/sched_getcpucount.cpp [new file with mode: 0644]
libc/src/sched/sched_getcpucount.h [new file with mode: 0644]
libc/test/src/sched/CMakeLists.txt
libc/test/src/sched/cpu_count_test.cpp [new file with mode: 0644]