summaryrefslogtreecommitdiff
path: root/Libraries/LibC/mman.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-04 16:16:50 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-04 16:16:50 +0200
commit04b9dc2d30cfc9b383029f6a4b02e2725108b0ae (patch)
treee117a998173b767f9fd009d49c4f8573d8b85432 /Libraries/LibC/mman.h
parent63814ffebf16291419745cd8ba29a4d2fd888563 (diff)
downloadserenity-04b9dc2d30cfc9b383029f6a4b02e2725108b0ae.zip
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
Diffstat (limited to 'Libraries/LibC/mman.h')
-rw-r--r--Libraries/LibC/mman.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Libraries/LibC/mman.h b/Libraries/LibC/mman.h
new file mode 100644
index 0000000000..f8b408026d
--- /dev/null
+++ b/Libraries/LibC/mman.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#define MAP_SHARED 0x01
+#define MAP_PRIVATE 0x02
+#define MAP_FIXED 0x10
+#define MAP_ANONYMOUS 0x20
+#define MAP_ANON MAP_ANONYMOUS
+
+#define PROT_READ 0x1
+#define PROT_WRITE 0x2
+#define PROT_EXEC 0x4
+#define PROT_NONE 0x0
+
+#define MAP_FAILED ((void*)-1)
+
+__BEGIN_DECLS
+
+void* mmap(void* addr, size_t, int prot, int flags, int fd, off_t);
+void* mmap_with_name(void* addr, size_t, int prot, int flags, int fd, off_t, const char* name);
+int munmap(void*, size_t);
+int set_mmap_name(void*, size_t, const char*);
+int shm_open(const char* name, int flags, mode_t);
+int shm_unlink(const char* name);
+
+__END_DECLS