Kernel/LibC: Implement mprotect
There may be some race conditions with this but i think this is good enough to start with
This commit is contained in:
@@ -24,6 +24,11 @@ int munmap(void* addr, size_t len)
|
||||
return syscall(SYS_MUNMAP, addr, len);
|
||||
}
|
||||
|
||||
int mprotect(void* addr, size_t len, int prot)
|
||||
{
|
||||
return syscall(SYS_MPROTECT, addr, len, prot);
|
||||
}
|
||||
|
||||
int msync(void* addr, size_t len, int flags)
|
||||
{
|
||||
pthread_testcancel();
|
||||
@@ -45,8 +50,3 @@ int mlock(const void*, size_t)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
int mprotect(void*, size_t, int)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user