From deb5d5b9afa1ae23ee2f944a718ac01a4fd2aec6 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Wed, 2 Mar 2016 10:06:04 +0000 Subject: [PATCH] Miscellaneous minor documentation improvements from review. Copied from Perforce Change: 189529 ServerID: perforce.ravenbrook.com --- mps/manual/source/topic/root.rst | 10 +++++----- mps/manual/source/topic/scanning.rst | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/mps/manual/source/topic/root.rst b/mps/manual/source/topic/root.rst index 9c1f20b2b52..c174568b446 100644 --- a/mps/manual/source/topic/root.rst +++ b/mps/manual/source/topic/root.rst @@ -150,11 +150,11 @@ root by calling :c:func:`mps_root_create_thread`. The MPS's stack scanner needs to know how to find the :term:`cold end` of the part of the stack to scan. The :term:`cold end` of the relevant -part of stack can be found by taking the address of a local variable -in the function that calls the main work function of your thread. You -should take care to ensure that the work function is not inlined so -that the address is definitely in the stack frame below any potential -roots. +part of the stack can be found by taking the address of a local +variable in the function that calls the main work function of your +thread. You should take care to ensure that the work function is not +inlined so that the address is definitely in the stack frame below any +potential roots. .. index:: single: Scheme; thread root diff --git a/mps/manual/source/topic/scanning.rst b/mps/manual/source/topic/scanning.rst index eab99c79b2f..b842240995f 100644 --- a/mps/manual/source/topic/scanning.rst +++ b/mps/manual/source/topic/scanning.rst @@ -505,6 +505,7 @@ Fixing interface .. index:: single: scanning; area scanners + single: area; scanning .. _topic-scanning-area: @@ -512,8 +513,8 @@ Area scanners ------------- An area scanner :term:`scans` an area of memory for -:term:`references `. Various functions in the MPS interface, -such as :c:func:`mps_root_create_thread_tagged`, accept area scanners as +:term:`references`. Various functions in the MPS interface, such as +:c:func:`mps_root_create_thread_tagged`, accept area scanners as arguments so that the :term:`client program` can specify how to scan special areas such as the :term:`control stack`. @@ -584,7 +585,7 @@ the scanners, found in ``scan.c`` in the MPS source code. Scan an area of memory :term:`fixing ` every word, but remove tag bits before fixing references, and restore them afterwards. - ``closure`` should point to an :c:type:`mps_scan_tag_s`. Expects + ``closure`` must point to an :c:type:`mps_scan_tag_s`. Expects ``base`` and ``limit`` to be word-aligned. For example, if ``mask`` is 0b111 (decimal 7), then this scanner @@ -600,7 +601,7 @@ the scanners, found in ``scan.c`` in the MPS source code. .. c:function:: mps_res_t mps_scan_area_tagged(mps_ss_t ss, void *base, void *limit, void *closure) Scan an area of memory :term:`fixing ` only words whose - masked bits match a particular tag pattern. ``closure`` should + masked bits match a particular tag pattern. ``closure`` must point to a :c:type:`mps_scan_tag_s`. Expects ``base`` and ``limit`` to be word-aligned. @@ -624,7 +625,7 @@ the scanners, found in ``scan.c`` in the MPS source code. Scan an area of memory :term:`fixing ` only words whose masked bits are zero or match a particular tag pattern. - ``closure`` should point to a :c:type:`mps_scan_tag_s`. Expects + ``closure`` must point to a :c:type:`mps_scan_tag_s`. Expects ``base`` and ``limit`` to be word-aligned. For example, if ``mask`` is 7 and ``pattern`` is 3, then this