mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Add simplified mmap() and munmap() syscalls.
This commit is contained in:
parent
a5caf7ca99
commit
9a296d63f3
13 changed files with 116 additions and 2 deletions
16
LibC/mman.cpp
Normal file
16
LibC/mman.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "mman.h"
|
||||
#include <Kernel/Syscall.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
void* mmap(void* addr, size_t size)
|
||||
{
|
||||
return (void*)Syscall::invoke(Syscall::PosixMmap, (dword)addr, (dword)size);
|
||||
}
|
||||
|
||||
int munmap(void* addr, size_t size)
|
||||
{
|
||||
return Syscall::invoke(Syscall::PosixMunmap, (dword)addr, (dword)size);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue