fix dependency check logic cause config always disabled
[lunaix-os.git] / lunaix-os / usr / libc / src / posix / mann.c
1 #include <syscall.h>
2 #include <sys/mman.h>
3 #include <sys/types.h>
4
5 void*
6 mmap(void* addr, size_t length, int proct, int flags, int fd, off_t offset)
7 {
8     struct usr_mmap_param mparam = {
9         .addr = addr,
10         .length = length,
11         .proct = proct,
12         .flags = flags,
13         .fd = fd,
14         .offset = offset
15     };
16
17     return (void*)do_lunaix_syscall(__NR__lxsys_sys_mmap, &mparam);
18 }
19
20 int
21 munmap(void* addr, size_t length)
22 {
23     return do_lunaix_syscall(__NR__lxsys_munmap, addr, length);
24 }