f2fe1865fe4246e82331b5f988cdf785a0549623
[lunaix-os.git] / lunaix-os / usr / libc / src / posix / mann.c
1 #include <lunaix/syscall.h>
2 #include <lunaix/mann.h>
3 #include <lunaix/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(__SYSCALL_sys_mmap, &mparam);
18 }
19
20 int
21 munmap(void* addr, size_t length)
22 {
23     return do_lunaix_syscall(__SYSCALL_munmap, addr, length);
24 }