PatchworkOS
Loading...
Searching...
No Matches
mprotect.c
Go to the documentation of this file.
1
#include <
stdio.h
>
2
#include <
sys/io.h
>
3
4
#include "
user/common/syscalls.h
"
5
6
uint64_t
mprotect
(
void
*
address
,
uint64_t
length,
prot_t
prot)
7
{
8
uint64_t
result =
_syscall_mprotect
(
address
, length, prot);
9
if
(result ==
ERR
)
10
{
11
errno
=
_syscall_errno
();
12
}
13
return
result;
14
}
errno
#define errno
Error number variable.
Definition
errno.h:27
mprotect
uint64_t mprotect(void *address, uint64_t length, prot_t prot)
System call to change the protection flags of memory.
Definition
mprotect.c:6
prot_t
prot_t
Memory protection flags.
Definition
proc.h:170
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
address
static uintptr_t address
Definition
hpet.c:12
io.h
syscalls.h
_syscall_mprotect
static uint64_t _syscall_mprotect(void *address, uint64_t length, prot_t prot)
Definition
syscalls.h:203
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:118
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
stdio.h
src
libstd
user
functions
proc
mprotect.c
Generated by
1.9.8