summaryrefslogtreecommitdiff
path: root/src/user/lib/mman.c
diff options
context:
space:
mode:
authordzwdz2023-08-14 18:51:07 +0200
committerdzwdz2023-08-14 18:51:07 +0200
commit642b5fb0007b64c77d186fcb018d571152ee1d47 (patch)
tree1c466461f3602d306be309a053edae558ef2568e /src/user/lib/mman.c
parent8050069c57b729c18c19b1a03ab6e4bf63b4735e (diff)
reorganization: first steps
Diffstat (limited to 'src/user/lib/mman.c')
-rw-r--r--src/user/lib/mman.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/user/lib/mman.c b/src/user/lib/mman.c
deleted file mode 100644
index 32eeb2a..0000000
--- a/src/user/lib/mman.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* mmap() emulation */
-#include <camellia/syscalls.h>
-#include <errno.h>
-#include <sys/mman.h>
-
-void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off) {
- (void)fd; (void) off;
- if ((flags & MMAP_UNSUPPORTED) == MMAP_UNSUPPORTED ||
- (prot & MMAP_UNSUPPORTED) == MMAP_UNSUPPORTED ||
- !(flags & MAP_ANONYMOUS))
- {
- errno = ENOSYS;
- return NULL;
- }
-
- void *p = _sys_memflag(addr, len, MEMFLAG_FINDFREE | MEMFLAG_PRESENT);
- if (!p) errno = ENOMEM;
- return p;
-}
-
-int munmap(void *addr, size_t len) {
- _sys_memflag(addr, len, 0);
- return 0;
-}