[libc] add mprotect
authorMichael Jones <michaelrj@google.com>
Wed, 21 Sep 2022 23:51:53 +0000 (16:51 -0700)
committerMichael Jones <michaelrj@google.com>
Fri, 23 Sep 2022 16:36:37 +0000 (09:36 -0700)
commit47b724048b418892dffa62cead800c5e1121b616
tree2c918f5c246a6c50a11fb132b481bec2b5966d90
parent8d615a5e8af238ad4c010820634130c531205df4
[libc] add mprotect

Add the mprotect syscall wrapper and tests.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D134497
libc/config/linux/x86_64/entrypoints.txt
libc/spec/posix.td
libc/src/sys/mman/CMakeLists.txt
libc/src/sys/mman/linux/CMakeLists.txt
libc/src/sys/mman/linux/mprotect.cpp [new file with mode: 0644]
libc/src/sys/mman/mprotect.h [new file with mode: 0644]
libc/test/src/sys/mman/linux/CMakeLists.txt
libc/test/src/sys/mman/linux/mprotect_test.cpp [new file with mode: 0644]