From 69f50aa3e8ac916f03521577f8fea88ba9d23f11 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Sat, 23 Oct 2021 19:40:11 +0800 Subject: [PATCH] runtime: add cppruntime/perm --- cppruntime/perm.hpp | 16 ++++++++++++++++ cppruntime/runtime.hpp | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 cppruntime/perm.hpp create mode 100644 cppruntime/runtime.hpp diff --git a/cppruntime/perm.hpp b/cppruntime/perm.hpp new file mode 100644 index 0000000..20bb812 --- /dev/null +++ b/cppruntime/perm.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include + + +namespace helos { + +// Permission on block devices and files, in all-right Unix fashion. +// This must be in-line with MAP_PROT_EXEC/WRITE/READ and other Unix perms. +typedef uint16_t Permission; +constexpr Permission PermExecute = 1 << 0; +constexpr Permission PermWrite = 1 << 1; +constexpr Permission PermRead = 1 << 2; + + +} // namespace helos diff --git a/cppruntime/runtime.hpp b/cppruntime/runtime.hpp new file mode 100644 index 0000000..7535e72 --- /dev/null +++ b/cppruntime/runtime.hpp @@ -0,0 +1,5 @@ +#pragma once + +#include "../memory/memory.hpp" + +#include "perm.hpp"