The sysconf function has many options, this patch adds the basic funtion
and the pagesize option. More options will be added in future patches.
Details
Details
- Reviewers
sivachandra lntue - Commits
- rG1ac525b28b3b: [libc] add sysconf with pagesize
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/include/llvm-libc-macros/linux/unistd-macros.h | ||
---|---|---|
18 | Should we equivalently define _SC_PAGE_SIZE also? | |
libc/spec/posix.td | ||
512 | Why did this get modified? | |
libc/src/unistd/linux/sysconf.cpp | ||
23 | Can we return here? Also, add a TODO here saying that we should ideally get the page size from the auxvector. | |
26 | Can we set errno to EINVAL and return -1? |
Comment Actions
cleanup and address comments
libc/spec/posix.td | ||
---|---|---|
512 | I edited the wrong spec when setting up sysconf and apparently forgot to fix it. |
Should we equivalently define _SC_PAGE_SIZE also?