X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/32b9a6d76790c73d3d2d36d9081a2581cc65d184..28c176b668c841a3b7fb093faccf0efa39257603:/lunaix-os/usr/libc/src/posix/mann.c?ds=sidebyside diff --git a/lunaix-os/usr/libc/src/posix/mann.c b/lunaix-os/usr/libc/src/posix/mann.c new file mode 100644 index 0000000..f2fe186 --- /dev/null +++ b/lunaix-os/usr/libc/src/posix/mann.c @@ -0,0 +1,24 @@ +#include +#include +#include + +void* +mmap(void* addr, size_t length, int proct, int flags, int fd, off_t offset) +{ + struct usr_mmap_param mparam = { + .addr = addr, + .length = length, + .proct = proct, + .flags = flags, + .fd = fd, + .offset = offset + }; + + return (void*)do_lunaix_syscall(__SYSCALL_sys_mmap, &mparam); +} + +int +munmap(void* addr, size_t length) +{ + return do_lunaix_syscall(__SYSCALL_munmap, addr, length); +}