2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <aros/kernel.h>
7 #include <aros/libcall.h>
9 #include <kernel_base.h>
10 #include <kernel_intern.h>
15 AROS_LH3I(void, KrnSetProtection
,
16 AROS_LHA(void *, address
, A0
),
17 AROS_LHA(uint32_t, length
, D0
),
18 AROS_LHA(KRN_MapAttr
, flags
, D1
),
19 struct KernelBase
*, KernelBase
, 21, Kernel
)
25 if (flags
& MAP_Readable
)
26 flags_unix
|= PROT_READ
;
27 if (flags
& MAP_Writable
)
28 flags_unix
|= PROT_WRITE
;
29 if (flags
& MAP_Executable
)
30 flags_unix
|= PROT_EXEC
;
32 KernelBase
->kb_PlatformData
->iface
->mprotect(address
, length
, flags_unix
);