aboutsummaryrefslogtreecommitdiff
path: root/lib/sys/mmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sys/mmap.h')
-rw-r--r--lib/sys/mmap.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/sys/mmap.h b/lib/sys/mmap.h
new file mode 100644
index 0000000..7e885c4
--- /dev/null
+++ b/lib/sys/mmap.h
@@ -0,0 +1,17 @@
+#ifndef MMAP_H
+#define MMAP_H
+#include "syscalls.h"
+
+#define PROT_READ 0x1
+#define PROT_WRITE 0x2
+#define PROT_EXEC 0x4
+#define PROT_NONE 0x0
+
+#define MAP_SHARED 0x1
+#define MAP_PRIVATE 0x2
+
+static void * mmap(void * addr, unsigned long size, int prot, int flags, int fd, int offset) {
+ return syscall(MMAP, size, prot, flags, fd, offset);
+}
+
+#endif