1 //===-- Linux implementation of sysconf -----------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "src/unistd/sysconf.h"
11 #include "src/__support/common.h"
13 #include "src/errno/libc_errno.h"
14 #include <linux/param.h> // For EXEC_PAGESIZE.
17 namespace LIBC_NAMESPACE
{
19 LLVM_LIBC_FUNCTION(long, sysconf
, (int name
)) {
21 if (name
== _SC_PAGESIZE
) {
22 // TODO: get this information from the auxvector.
25 // TODO: Complete the rest of the sysconf options.
33 } // namespace LIBC_NAMESPACE