From 423bb95e4c7d105a57b25192584f0502ab1c8f97 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Tue, 14 Oct 2014 22:59:32 +0100 Subject: [PATCH] Add constant mps_rm_prot_inner and document it. Copied from Perforce Change: 187271 ServerID: perforce.ravenbrook.com --- mps/code/mps.h | 5 +++-- mps/manual/source/topic/root.rst | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mps/code/mps.h b/mps/code/mps.h index 089164ed9e2..4e75d49b73a 100644 --- a/mps/code/mps.h +++ b/mps/code/mps.h @@ -294,8 +294,9 @@ extern mps_rank_t mps_rank_weak(void); /* Root Modes */ /* .rm: Keep in sync with */ -#define MPS_RM_CONST (((mps_rm_t)1<<0)) -#define MPS_RM_PROT (((mps_rm_t)1<<1)) +#define MPS_RM_CONST (((mps_rm_t)1<<0)) +#define MPS_RM_PROT (((mps_rm_t)1<<1)) +#define MPS_RM_PROT_INNER (((mps_rm_t)1<<1)) /* Allocation Point */ diff --git a/mps/manual/source/topic/root.rst b/mps/manual/source/topic/root.rst index e28c9c87a6d..4a1e06686ae 100644 --- a/mps/manual/source/topic/root.rst +++ b/mps/manual/source/topic/root.rst @@ -242,8 +242,8 @@ allowing the MPS to detect whether they have changed. The type of :term:`root modes`. It should be zero (meaning neither constant or protectable), or - the sum of some subset of :c:macro:`MPS_RM_CONST` and - :c:macro:`MPS_RM_PROT`. + the sum of some of :c:macro:`MPS_RM_CONST`, + :c:macro:`MPS_RM_PROT`, and :c:macro:`MPS_RM_PROT_INNER`. .. c:macro:: MPS_RM_CONST @@ -289,6 +289,14 @@ allowing the MPS to detect whether they have changed. wants the operating system to be able to access the root. Many operating systems can't cope with writing to protected pages. +.. c:macro:: MPS_RM_PROT_INNER + + The :term:`root mode` for :term:`protectable roots` whose inner + pages (only) may be protected. This mode must not be specified + unless :c:macro:`MPS_RM_PROT` is also specified. It tells the MPS + that it may not place a :term:`barrier (1)` on a :term:`page` + that's partly (but not wholly) covered by the :term:`root`. + .. index:: single: root; interface