Summary: This patch adds a convenience template function so we don't need to cast all types to `long` manually when calling `__llvm_libc::syscall`.
Reviewers: sivachandra, MaskRay, gchatelet
Reviewed By: sivachandra
Subscribers: libc-commits, tschuett
Differential Revision: https://reviews.llvm.org/D74530
This allows us to get rid of the PAGE_SIZE macro and use EXEC_PAGESIZE
from linux/param.h.
Few other points about this change:
1. The linux syscall functions have been moved into a linux specific area
instead of src/unistd/syscall.h. The Linux syscall function from unistd.h
is a public vararg function. What we have currently are linux speciif internal
overloaded C++ functions. So, moving them to a Linux only area is more
meaningful.
2. The implementations of mmap and munmap are now in a 'linux' directory
within src/sys/mman. The idea here is that platform specific
implementations will live in a platform specific subdirectories like these.
Infrastructure common to a platform will live in the platform's config
directory. For example, the linux syscall implementations live in
config/linux.
Reviewers: abrachet
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D73302
Header files included wrongly using <...> are now included using the
internal path names as the new unittest framework allows us to do so.
Reviewers: phosek, abrachet
Differential Revision: https://reviews.llvm.org/D72743
Summary:
Now that tests live in separate top-level directory, keeping the
implementations of individual functions in a directory of their own is
not meaningful. Hence, this change moves them into the higher level
string directory.
NFC intended.
Reviewers: MaskRay
Subscribers: mgorny, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D72295
A toplevel target, `check-libc` has also been added.
Reviewers: abrachet, phosek
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D72177