[libc-commits] [PATCH] D73302: [libc] Move the implementation of mmap and munmap into a linux specific area.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jan 23 15:52:55 PST 2020
sivachandra created this revision.
sivachandra added a reviewer: abrachet.
Herald added subscribers: libc-commits, tschuett, MaskRay, mgorny.
Herald added a project: libc-project.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73302
Files:
libc/config/linux/CMakeLists.txt
libc/config/linux/platfrom_defs.h.inc
libc/config/linux/syscall.h.def
libc/include/CMakeLists.txt
libc/src/CMakeLists.txt
libc/src/sys/mman/CMakeLists.txt
libc/src/sys/mman/linux/CMakeLists.txt
libc/src/sys/mman/linux/mmap.cpp
libc/src/sys/mman/linux/munmap.cpp
libc/src/sys/mman/mmap.cpp
libc/src/sys/mman/munmap.cpp
libc/src/unistd/CMakeLists.txt
libc/src/unistd/syscall.h.def
libc/test/config/linux/x86_64/CMakeLists.txt
libc/test/config/linux/x86_64/syscall_test.cpp
libc/test/src/sys/mman/CMakeLists.txt
libc/test/src/sys/mman/linux/CMakeLists.txt
libc/test/src/sys/mman/linux/mmap_test.cpp
libc/test/src/sys/mman/mmap_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73302.240035.patch
Type: text/x-patch
Size: 10330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200123/833b5de4/attachment.bin>
More information about the libc-commits
mailing list