Create a temporary solution to call a 6-arguments system call (specifically, mmap).

This commit is contained in:
Enrico Fraccaroli (Galfurian)
2023-06-09 15:36:03 -04:00
parent a007e4e4c7
commit fb0323c8ce
6 changed files with 105 additions and 15 deletions
+14
View File
@@ -0,0 +1,14 @@
/// @file mman.c
/// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief Functions for managing mappings in virtual address space.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/mman.h"
#include "system/syscall_types.h"
#include "sys/unistd.h"
#include "sys/errno.h"
_syscall6(void *, mmap, void *, addr, size_t, length, int, prot, int, flags, int, fd, off_t, offset)
_syscall2(int, munmap, void *, addr, size_t, length)