summaryrefslogtreecommitdiffstats
path: root/libc/spec/linux.td
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2019-12-04 23:17:14 -0800
committerSiva Chandra Reddy <sivachandra@google.com>2019-12-23 14:04:02 -0800
commite5a743c4f6e3639ba3bee778c894a996ef96391a (patch)
tree3e0d71a35f51bef145cb95f010707a6d2a4ac58e /libc/spec/linux.td
parent187f66bcac668dd2ea25244ed7d7711551275f9d (diff)
downloadbcm5719-llvm-e5a743c4f6e3639ba3bee778c894a996ef96391a.tar.gz
bcm5719-llvm-e5a743c4f6e3639ba3bee778c894a996ef96391a.zip
Add implementations of POSIX mmap and munmap functions.
Summary: A set of of linux x86_64 internal syscall helpers have also been added. This change does not try to be perfect with respect to OS and machine abstractions. A TODO note has been added at places where such abstractions would help and make the arrangement scalable and cleaner. Addressing the TODOs and building such abstractions is not in the scope of this change. It is hoped that follow up changes cleaning up the problem areas and addressing the TODOs will better illustrate the need for the changes. This change also does not try to imitate mmap and munmap implementations of other libcs. The idea here is to put in the bare minimum required to obtain a working mmap and munmap, and then add the rest of the functionality on an as needed basis. Reviewers: abrachet, phosek, stanshebs, theraven Subscribers: mgorny, MaskRay, jfb, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D71634
Diffstat (limited to 'libc/spec/linux.td')
-rw-r--r--libc/spec/linux.td8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/spec/linux.td b/libc/spec/linux.td
index da6812f8810..2e773860d1e 100644
--- a/libc/spec/linux.td
+++ b/libc/spec/linux.td
@@ -60,7 +60,15 @@ def Linux : StandardSpec<"Linux"> {
[] // Functions
>;
+ HeaderSpec SysMMan = HeaderSpec<
+ "sys/mman.h",
+ [Macro<"MAP_ANONYMOUS">],
+ [], // Types
+ [] // Functions
+ >;
+
let Headers = [
Errno,
+ SysMMan,
];
}
OpenPOWER on IntegriCloud