From 4bf477d5ed372fd44697d2f0df245b61b4f3f7b3 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Thu, 18 Nov 2021 13:18:38 -0800 Subject: filling out system layer --- sys/linux/port/arch/constants.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'sys/linux/port/arch/constants.h') diff --git a/sys/linux/port/arch/constants.h b/sys/linux/port/arch/constants.h index 2b26899..b8d3878 100644 --- a/sys/linux/port/arch/constants.h +++ b/sys/linux/port/arch/constants.h @@ -1,7 +1,8 @@ #pragma once +/* open */ #define sys·OCreate 0x40u -#define sys·ONotty 0x100u +#define sys·ONoTTY 0x100u #define sys·OTrunc 0x200u #define sys·OAppend 0x400u #define sys·ONoBlock 0x800u @@ -11,3 +12,34 @@ #define sys·ODirectory 0x10000u #define sys·ONoFollow 0x20000u #define sys·OTmpFile 0x410000u + +/* mmap */ +#define sys·ProtNone 0 +#define sys·ProtRead 1 +#define sys·ProtWrite 2 +#define sys·ProtExec 4 +#define sys·ProtGrowsDown 0x01000000 +#define sys·ProtGrowsUp 0x02000000 + +#define sys·MapFile 0 +#define sys·MapShared 0x01 +#define sys·MapPrivate 0x02 +#define sys·MapSharedValidate 0x03 +#define sys·MapType 0x0f +#define sys·MapFixed 0x10 +#define sys·MapAnon 0x20 +#define sys·MapNoReserve 0x4000 +#define sys·MapGrowsDown 0x0100 +#define sys·MapDenyWrite 0x0800 +#define sys·MapExecutable 0x1000 +#define sys·MapLocked 0x2000 +#define sys·MapPopulate 0x8000 +#define sys·MapNonBlock 0x10000 +#define sys·MapStack 0x20000 +#define sys·MapHugetlb 0x40000 +#define sys·MapSync 0x80000 +#define sys·MapFixedNoReplace 0x100000 + +#define sys·RemapCanMove 1 +#define sys·RemapFixed 2 +#define sys·RemapNoUnmap 4 -- cgit v1.2.1