1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 08:41:47 -07:00

Use tags with dots; regularize design references from code.

Copied from Perforce
 Change: 195761
This commit is contained in:
Gareth Rees 2018-11-29 17:12:29 +00:00
parent 5faa229dd0
commit 4eda4e85c7
170 changed files with 837 additions and 834 deletions

View file

@ -5,7 +5,7 @@
*
* .purpose: A fixed-length FIFO queue.
*
* .design: <design/abq/>
* .design: <design/abq>
*/
#include "meter.h"

View file

@ -5,7 +5,7 @@
*
* .purpose: A fixed-length FIFO queue.
*
* .design: <design/abq/>
* .design: <design/abq>
*/
#ifndef abq_h

View file

@ -24,7 +24,7 @@
* but fails on lii6ll in variety HOT. Rather than struggle to defeat
* the Clang optimizer, we choose not to test in this configuration.
* In any case, the MPS does not guarantee anything about timely
* finalization (see <manual/html/topic/finalization.html#cautions>).
* finalization <manual/html/topic/finalization.html#cautions>.
*/
#include "mps.h"

View file

@ -126,7 +126,7 @@ static void *kid_thread(void *arg)
closure_t cl = arg;
/* Register the thread twice to check this is supported -- see
* <design/thread-manager/#req.register.multi>
* <design/thread-manager#.req.register.multi>
*/
die(mps_thread_reg(&thread1, arena), "thread_reg");
die(mps_thread_reg(&thread2, arena), "thread_reg");

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
*
* .sources: <design/arena/> is the main design document. */
* .sources: <design/arena> is the main design document. */
#include "tract.h"
#include "poolmvff.h"
@ -27,7 +27,7 @@ SRCID(arena, "$Id$");
Bool ArenaGrainSizeCheck(Size size)
{
CHECKL(size > 0);
/* <design/arena/#req.attr.block.align.min> */
/* <design/arena#.req.attr.block.align.min> */
CHECKL(SizeIsAligned(size, MPS_PF_ALIGN));
/* Grain size must be a power of 2 for the tract lookup and the
* zones to work. */
@ -178,7 +178,7 @@ Bool ArenaCheck(Arena arena)
CHECKD(Globals, ArenaGlobals(arena));
CHECKL(BoolCheck(arena->poolReady));
if (arena->poolReady) { /* <design/arena/#pool.ready> */
if (arena->poolReady) { /* <design/arena#.pool.ready> */
CHECKD(MVFF, &arena->controlPoolStruct);
}
@ -271,7 +271,7 @@ static Res ArenaAbsInit(Arena arena, Size grainSize, ArgList args)
arena->grainSize = grainSize;
/* zoneShift must be overridden by arena class init */
arena->zoneShift = ZoneShiftUNSET;
arena->poolReady = FALSE; /* <design/arena/#pool.ready> */
arena->poolReady = FALSE; /* <design/arena#.pool.ready> */
arena->lastTract = NULL;
arena->lastTractBase = NULL;
arena->hasFreeLand = FALSE;
@ -517,7 +517,7 @@ Res ControlInit(Arena arena)
} MPS_ARGS_END(args);
if (res != ResOK)
return res;
arena->poolReady = TRUE; /* <design/arena/#pool.ready> */
arena->poolReady = TRUE; /* <design/arena#.pool.ready> */
EventLabelPointer(&arena->controlPoolStruct, EventInternString("Control"));
return ResOK;
}
@ -677,7 +677,7 @@ Res ArenaDescribeTracts(Arena arena, mps_lib_FILE *stream, Count depth)
* control pool, which is an MV pool embedded in the arena itself.
*
* .controlalloc.addr: In implementations where Addr is not compatible
* with void* (<design/type/#addr.use>), ControlAlloc must take care of
* with void* <design/type#.addr.use>, ControlAlloc must take care of
* allocating so that the block can be addressed with a void*. */
Res ControlAlloc(void **baseReturn, Arena arena, size_t size)
@ -793,7 +793,7 @@ void ArenaChunkRemoved(Arena arena, Chunk chunk)
* This is a primitive allocator used to allocate pages for the arena
* Land. It is called rarely and can use a simple search. It may not
* use the Land or any pool, because it is used as part of the
* bootstrap. See design.mps.bootstrap.land.sol.alloc.
* bootstrap. <design/bootstrap#.land.sol.alloc>.
*/
static Res arenaAllocPageInChunk(Addr *baseReturn, Chunk chunk, Pool pool)
@ -903,7 +903,7 @@ static void arenaExcludePage(Arena arena, Range pageRange)
* The arena's free land can't get memory for its block pool in the
* usual way (via ArenaAlloc), because it is the mechanism behind
* ArenaAlloc! So we extend the block pool via a back door (see
* arenaExtendCBSBlockPool). See design.mps.bootstrap.land.sol.pool.
* arenaExtendCBSBlockPool). <design/bootstrap#.land.sol.pool>.
*
* Only fails if it can't get a page for the block pool.
*/
@ -1106,7 +1106,7 @@ Res ArenaAlloc(Addr *baseReturn, LocusPref pref, Size size, Pool pool)
base = TractBase(tract);
/* cache the tract - <design/arena/#tract.cache> */
/* cache the tract - <design/arena#.tract.cache> */
arena->lastTract = tract;
arena->lastTractBase = base;
@ -1139,7 +1139,7 @@ void ArenaFree(Addr base, Size size, Pool pool)
RangeInitSize(&range, base, size);
/* uncache the tract if in range - <design/arena/#tract.uncache> */
/* uncache the tract if in range - <design/arena#.tract.uncache> */
if (base <= arena->lastTractBase && arena->lastTractBase < RangeLimit(&range))
{
arena->lastTract = NULL;

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .design: See <design/arena/#client>.
* .design: <design/arena#.client>.
*
* .improve.remember: One possible performance improvement is to
* remember (a conservative approximation to) the indices of the first
@ -30,7 +30,7 @@ DECLARE_CLASS(Arena, ClientArena, AbstractArena);
typedef struct ClientArenaStruct {
ArenaStruct arenaStruct; /* generic arena structure */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} ClientArenaStruct;
typedef struct ClientArenaStruct *ClientArena;
@ -45,7 +45,7 @@ typedef struct ClientChunkStruct {
ChunkStruct chunkStruct; /* generic chunk */
Size freePages; /* number of free pages in chunk */
Addr pageBase; /* base of first managed page in chunk */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} ClientChunkStruct;
#define ClientChunk2Chunk(clchunk) (&(clchunk)->chunkStruct)
@ -327,7 +327,7 @@ static void ClientArenaDestroy(Arena arena)
ClientArena clientArena = MustBeA(ClientArena, arena);
/* Destroy all chunks, including the primary. See
* <design/arena/#chunk.delete> */
* <design/arena#.chunk.delete> */
arena->primary = NULL;
TreeTraverseAndDelete(&arena->chunkTree, clientChunkDestroy,
UNUSED_POINTER);

View file

@ -6,7 +6,7 @@
*
* DESIGN
*
* .design: See <design/arenavm/>, and <design/arena/#coop-vm>
* .design: <design/arenavm>, and <design/arena#.coop-vm>
*
* .vm.addr-is-star: In this file, Addr is compatible with C
* pointers, and Count with size_t (Index), because all refer to the
@ -45,7 +45,7 @@ typedef struct VMChunkStruct {
VMStruct vmStruct; /* virtual memory descriptor */
Addr overheadMappedLimit; /* limit of pages mapped for overhead */
SparseArrayStruct pages; /* to manage backing store of page table */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} VMChunkStruct;
#define VMChunk2Chunk(vmchunk) (&(vmchunk)->chunkStruct)
@ -61,7 +61,7 @@ typedef struct VMChunkStruct {
/* VMArena
*
* See <design/arena/#coop-vm.struct.vmarena> for description.
* <design/arena#.coop-vm.struct.vmarena> for description.
*/
typedef struct VMArenaStruct *VMArena;
@ -78,7 +78,7 @@ typedef struct VMArenaStruct { /* VM arena structure */
ArenaVMExtendedCallback extended;
ArenaVMContractedCallback contracted;
RingStruct spareRing; /* spare (free but mapped) tracts */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} VMArenaStruct;
#define VMArenaVM(vmarena) (&(vmarena)->vmStruct)
@ -615,7 +615,7 @@ static Res VMArenaCreate(Arena *arenaReturn, ArgList args)
AVER(sizeof(vmArena->vmParams) == sizeof(vmParams));
(void)mps_lib_memcpy(vmArena->vmParams, vmParams, sizeof(vmArena->vmParams));
/* <design/arena/#coop-vm.struct.vmarena.extendby.init> */
/* <design/arena#.coop-vm.struct.vmarena.extendby.init> */
vmArena->extendBy = size;
vmArena->extendMin = 0;
@ -653,7 +653,7 @@ static Res VMArenaCreate(Arena *arenaReturn, ArgList args)
/* number of stripes as will fit into a reference set (the number of */
/* bits in a word). Fail if the chunk is so small stripes are smaller */
/* than pages. Note that some zones are discontiguous in the chunk if */
/* the size is not a power of 2. See <design/arena/#class.fields>. */
/* the size is not a power of 2. <design/arena#.class.fields>. */
chunkSize = ChunkSize(chunk);
arena->zoneShift = SizeFloorLog2(chunkSize >> MPS_WORD_SHIFT);
AVER(ChunkPageSize(chunk) == ArenaGrainSize(arena));
@ -688,7 +688,7 @@ static void VMArenaDestroy(Arena arena)
VM vm = &vmStruct;
/* Destroy all chunks, including the primary. See
* <design/arena/#chunk.delete> */
* <design/arena#.chunk.delete> */
arena->primary = NULL;
TreeTraverseAndDelete(&arena->chunkTree, vmChunkDestroy,
UNUSED_POINTER);
@ -1181,7 +1181,7 @@ static void VMCompact(Arena arena, Trace trace)
STATISTIC(vmem1 = ArenaReserved(arena));
/* Destroy chunks that are completely free, but not the primary
* chunk. See <design/arena/#chunk.delete>
* chunk. <design/arena#.chunk.delete>
* TODO: add hysteresis here. See job003815. */
TreeTraverseAndDelete(&arena->chunkTree, vmChunkCompact, arena);

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2013-2018 Ravenbrook Limited. See end of file for license.
*
* .source: See <design/keyword-arguments.rst>.
* .source: <design/keyword-arguments.rst>.
*/
#include "config.h"

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2013-2014 Ravenbrook Limited. See end of file for license.
*
* .source: See <design/keyword-arguments.rst>.
* .source: <design/keyword-arguments.rst>.
*/
#ifndef arg_h

View file

@ -5,7 +5,7 @@
*
* DESIGN
*
* .design: see <design/poolawl/#test>.*
* .design: see <design/poolawl#.test>
*/
#include "mpscawl.h"

View file

@ -5,7 +5,7 @@
*
* DESIGN
*
* .design: see <design/poolawl/#test>.*
* .design: see <design/poolawl#.test>
*/
#include "mpscawl.h"

View file

@ -5,7 +5,7 @@
*
* DESIGN
*
* .design: see <design/poolawl/#test>.*
* .design: see <design/poolawl#.test>
*/
#include "mpscawl.h"

View file

@ -9,13 +9,13 @@
*
* DESIGN
*
* .design: see <design/bt/>
* .design: see <design/bt>
*
* .aver.critical: The function BTIsResRange (and anything it calls)
* is on the critical path <design/critical-path/> because it is
* is on the critical path <design/critical-path> because it is
* called by NailboardIsResRange, which is called for every object in
* a nailboarded segment when the segment is scanned or reclaimed; see
* <design/nailboard/#impl.isresrange>.
* <design/nailboard#.impl.isresrange>.
*/
#include "bt.h"
@ -178,7 +178,7 @@ SRCID(bt, "$Id$");
/* BTCreate -- allocate a BT from the control pool
*
* See <design/bt/#if.create>
* <design/bt#.if.create>
*/
Res BTCreate(BT *btReturn, Arena arena, Count length)
@ -203,7 +203,7 @@ Res BTCreate(BT *btReturn, Arena arena, Count length)
/* BTDestroy -- free a BT to the control pool.
*
* See <design/bt/#if.destroy>
* <design/bt#.if.destroy>
*/
void BTDestroy(BT bt, Arena arena, Count length)
@ -232,7 +232,7 @@ Bool BTCheck(BT bt)
/* BTSize -- return the size of a BT
*
* See <design/bt/#fun.size>
* <design/bt#.fun.size>
*/
Size (BTSize)(Count n)
@ -246,7 +246,7 @@ Size (BTSize)(Count n)
/* BTGet -- get a bit from a BT
*
* See <design/bt/#fun.get>
* <design/bt#.fun.get>
*/
Bool (BTGet)(BT t, Index i)
@ -261,7 +261,7 @@ Bool (BTGet)(BT t, Index i)
/* BTSet -- set a bit in a BT
*
* See <design/bt/#fun.set>
* <design/bt#.fun.set>
*/
void (BTSet)(BT t, Index i)
@ -276,7 +276,7 @@ void (BTSet)(BT t, Index i)
/* BTRes -- reset a bit in a BT
*
* <design/bt/#fun.res>
* <design/bt#.fun.res>
*/
void (BTRes)(BT t, Index i)
@ -291,7 +291,7 @@ void (BTRes)(BT t, Index i)
/* BTSetRange -- set a range of bits in a BT
*
* <design/bt/#fun.set-range>
* <design/bt#.fun.set-range>
*/
void BTSetRange(BT t, Index base, Index limit)
@ -313,7 +313,7 @@ void BTSetRange(BT t, Index base, Index limit)
/* BTIsResRange -- test whether a range of bits is all reset
*
* See <design/bt/#fun.is-reset-range>.
* <design/bt#.fun.is-reset-range>.
*/
Bool BTIsResRange(BT bt, Index base, Index limit)
@ -337,7 +337,7 @@ Bool BTIsResRange(BT bt, Index base, Index limit)
/* BTIsSetRange -- test whether a range of bits is all set
*
* See <design/bt/#fun.is-set-range>.
* <design/bt#.fun.is-set-range>.
*/
Bool BTIsSetRange(BT bt, Index base, Index limit)
@ -365,7 +365,7 @@ Bool BTIsSetRange(BT bt, Index base, Index limit)
/* BTResRange -- reset a range of bits in a BT
*
* <design/bt/#fun.res-range>
* <design/bt#.fun.res-range>
*/
void BTResRange(BT t, Index base, Index limit)
@ -618,7 +618,7 @@ btFindResHighLabel:; \
*
* Starts searching at the low end of the search range.
*
* See <design/bt/#fun.find-res-range>.
* <design/bt#.fun.find-res-range>.
*/
static Bool BTFindResRange(Index *baseReturn, Index *limitReturn,
@ -708,7 +708,7 @@ static Bool BTFindResRange(Index *baseReturn, Index *limitReturn,
*
* Starts searching at the high end of the search range.
*
* See <design/bt/#fun.find-res-range>.
* <design/bt#.fun.find-res-range>.
*/
static Bool BTFindResRangeHigh(Index *baseReturn, Index *limitReturn,
@ -805,7 +805,7 @@ static Bool BTFindResRangeHigh(Index *baseReturn, Index *limitReturn,
/* BTFindLongResRange -- find long range of reset bits in a bit table
*
* See <design/bt/#fun.find-long-res-range>.
* <design/bt#.fun.find-long-res-range>.
*/
Bool BTFindLongResRange(Index *baseReturn, Index *limitReturn,
@ -823,7 +823,7 @@ Bool BTFindLongResRange(Index *baseReturn, Index *limitReturn,
/* BTFindLongResRangeHigh -- find long range of reset bits in a bit table
*
* See <design/bt/#fun.find-long-res-range-high>.
* <design/bt#.fun.find-long-res-range-high>.
*/
Bool BTFindLongResRangeHigh(Index *baseReturn, Index *limitReturn,
@ -841,7 +841,7 @@ Bool BTFindLongResRangeHigh(Index *baseReturn, Index *limitReturn,
/* BTFindShortResRange -- find short range of reset bits in a bit table
*
* See <design/bt/#fun.find-short-res-range>.
* <design/bt#.fun.find-short-res-range>.
*/
Bool BTFindShortResRange(Index *baseReturn, Index *limitReturn,
@ -860,7 +860,7 @@ Bool BTFindShortResRange(Index *baseReturn, Index *limitReturn,
*
* Starts looking from the top of the search range.
*
* See <design/bt/#fun.find-short-res-range-high>.
* <design/bt#.fun.find-short-res-range-high>.
*/
Bool BTFindShortResRangeHigh(Index *baseReturn, Index *limitReturn,
@ -878,7 +878,7 @@ Bool BTFindShortResRangeHigh(Index *baseReturn, Index *limitReturn,
/* BTRangesSame -- check that a range of bits in two BTs are the same.
*
* See <design/bt/#if.ranges-same>
* <design/bt#.if.ranges-same>
*/
Bool BTRangesSame(BT comparand, BT comparator, Index base, Index limit)
@ -914,7 +914,7 @@ Bool BTRangesSame(BT comparand, BT comparator, Index base, Index limit)
/* BTCopyInvertRange -- copy a range of bits from one BT to another,
* inverting them as you go.
*
* See <design/bt/#if.copy-invert-range>
* <design/bt#.if.copy-invert-range>
*/
void BTCopyInvertRange(BT fromBT, BT toBT, Index base, Index limit)
@ -949,7 +949,7 @@ void BTCopyInvertRange(BT fromBT, BT toBT, Index base, Index limit)
/* BTCopyRange -- copy a range of bits from one BT to another
*
* See <design/bt/#if.copy-range>
* <design/bt#.if.copy-range>
*/
void BTCopyRange(BT fromBT, BT toBT, Index base, Index limit)
@ -989,7 +989,7 @@ void BTCopyRange(BT fromBT, BT toBT, Index base, Index limit)
* may differ for each range. We could try to be smart about
* detecting similar alignment - but we don't.
*
* See <design/bt/#if.copy-offset-range>
* <design/bt#.if.copy-offset-range>
*/
void BTCopyOffsetRange(BT fromBT, BT toBT,

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .source: <design/bt/>
* .source: <design/bt>
*/
#ifndef bt_h
@ -16,21 +16,21 @@
extern Size (BTSize)(Count length);
#define BTSize(n) (((n) + MPS_WORD_WIDTH-1) / MPS_WORD_WIDTH * sizeof(Word))
/* <design/bt/#if.get> */
/* <design/bt#.if.get> */
extern Bool (BTGet)(BT bt, Index index);
#define BTGet(a, i) \
((Bool)(((a)[((i) >> MPS_WORD_SHIFT)] \
>> ((i) & ~((Word)-1 << MPS_WORD_SHIFT))) \
& (Word)1))
/* <design/bt/#if.set> */
/* <design/bt#.if.set> */
extern void (BTSet)(BT bt, Index index);
#define BTSet(a, i) \
BEGIN \
(a)[((i)>>MPS_WORD_SHIFT)] |= (Word)1<<((i)&~((Word)-1<<MPS_WORD_SHIFT)); \
END
/* <design/bt/#if.res> */
/* <design/bt#.if.res> */
extern void (BTRes)(BT bt, Index index);
#define BTRes(a, i) \
BEGIN \

View file

@ -10,7 +10,7 @@
*
* DESIGN
*
* .design: See <design/buffer/>.
* .design: <design/buffer>.
*
* .ap.async: The mutator is allowed to change certain AP fields
* asynchronously. Functions that can be called on buffers not
@ -231,7 +231,7 @@ static Res BufferInit(Buffer buffer, BufferClass klass,
/* BufferCreate -- create an allocation buffer
*
* See <design/buffer/#method.create>.
* <design/buffer#.method.create>.
*/
Res BufferCreate(Buffer *bufferReturn, BufferClass klass,
@ -318,7 +318,8 @@ void BufferDetach(Buffer buffer, Pool pool)
/* BufferDestroy -- destroy an allocation buffer
*
* See <design/buffer/#method.destroy>. */
* <design/buffer#.method.destroy>.
*/
void BufferDestroy(Buffer buffer)
{
@ -439,7 +440,8 @@ void BufferSetAllocAddr(Buffer buffer, Addr addr)
/* BufferFramePush
*
* See <design/alloc-frame/>. */
* <design/alloc-frame>.
*/
Res BufferFramePush(AllocFrame *frameReturn, Buffer buffer)
{
@ -462,7 +464,8 @@ Res BufferFramePush(AllocFrame *frameReturn, Buffer buffer)
/* BufferFramePop
*
* See <design/alloc-frame/>. */
* <design/alloc-frame>.
*/
Res BufferFramePop(Buffer buffer, AllocFrame frame)
{
@ -478,7 +481,8 @@ Res BufferFramePop(Buffer buffer, AllocFrame frame)
/* BufferReserve -- reserve memory from an allocation buffer
*
* .reserve: Keep in sync with <code/mps.h#reserve>. */
* .reserve: Keep in sync with <code/mps.h#reserve>.
*/
Res BufferReserve(Addr *pReturn, Buffer buffer, Size size)
{
@ -539,7 +543,7 @@ void BufferAttach(Buffer buffer, Addr base, Addr limit,
filled = AddrOffset(init, limit);
buffer->fillSize += filled;
if (buffer->isMutator) {
if (base != init) { /* see <design/buffer/#count.alloc.how> */
if (base != init) { /* see <design/buffer#.count.alloc.how> */
Size prealloc = AddrOffset(base, init);
ArenaGlobals(buffer->arena)->allocMutatorSize -= prealloc;
}
@ -634,7 +638,7 @@ Bool BufferCommit(Buffer buffer, Addr p, Size size)
AVER(SizeIsAligned(size, BufferPool(buffer)->alignment));
AVER(!BufferIsReady(buffer));
/* See <design/collection/#flip>. */
/* <design/collection#.flip>. */
/* .commit.before: If a flip occurs before this point, when the */
/* pool reads "initAtFlip" it will point below the object, so it */
/* will be trashed and the commit must fail when trip is called. */
@ -1029,7 +1033,7 @@ Bool BufferClassCheck(BufferClass klass)
/* BufferClass -- the vanilla buffer class definition
*
* See <design/buffer/#class.hierarchy.buffer>. */
* <design/buffer#.class.hierarchy.buffer>. */
DEFINE_CLASS(Inst, BufferClass, klass)
{
@ -1243,7 +1247,7 @@ static Res segBufDescribe(Inst inst, mps_lib_FILE *stream, Count depth)
/* SegBufClass -- SegBuf class definition
*
* Supports an association with a single segment when attached. See
* <design/buffer/#class.hierarchy.segbuf>. */
* <design/buffer#.class.hierarchy.segbuf>. */
DEFINE_CLASS(Buffer, SegBuf, klass)
{

View file

@ -9,7 +9,7 @@
* .purpose: CBSs are used to manage potentially unbounded collections
* of memory blocks.
*
* .sources: <design/cbs/>.
* .sources: <design/cbs>.
*
* .critical: In manual-allocation-bound programs using MVFF, many of
* these functions are on the critical paths via mps_alloc (and then
@ -155,7 +155,7 @@ static void cbsUpdateZonedNode(SplayTree splay, Tree tree)
/* cbsInit -- Initialise a CBS structure
*
* See <design/land/#function.init>.
* <design/land#.function.init>.
*/
ARG_DEFINE_KEY(cbs_block_pool, Pool);
@ -231,7 +231,7 @@ static Res cbsInitZoned(Land land, Arena arena, Align alignment, ArgList args)
/* cbsFinish -- Finish a CBS structure
*
* See <design/land/#function.finish>.
* <design/land#.function.finish>.
*/
static void cbsFinish(Inst inst)
@ -253,7 +253,7 @@ static void cbsFinish(Inst inst)
/* cbsSize -- total size of ranges in CBS
*
* See <design/land/#function.size>.
* <design/land#.function.size>.
*/
static Size cbsSize(Land land)
@ -380,7 +380,7 @@ static void cbsBlockInsert(CBS cbs, RangeTree block)
/* cbsInsert -- Insert a range into the CBS
*
* See <design/cbs/#functions.cbs.insert>.
* <design/cbs#.functions.cbs.insert>.
*
* .insert.alloc: Will only allocate a block if the range does not
* abut an existing range.
@ -548,7 +548,7 @@ static Res cbsInsertSteal(Range rangeReturn, Land land, Range rangeIO)
/* cbsDelete -- Remove a range from a CBS
*
* See <design/land/#function.delete>.
* <design/land#.function.delete>.
*
* .delete.alloc: Will only allocate a block if the range splits
* an existing range.
@ -758,7 +758,7 @@ static Res cbsZonedSplayNodeDescribe(Tree tree, mps_lib_FILE *stream)
/* cbsIterate -- iterate over all blocks in CBS
*
* See <design/land/#function.iterate>.
* <design/land#.function.iterate>.
*/
typedef struct CBSIterateClosure {
@ -800,7 +800,7 @@ static Bool cbsIterate(Land land, LandVisitor visitor, void *visitorClosure)
/* cbsIterateAndDelete -- iterate over all blocks in CBS
*
* See <design/land/#function.iterate.and.delete>.
* <design/land#.function.iterate.and.delete>.
*/
typedef struct CBSIterateAndDeleteClosure {
@ -1137,7 +1137,7 @@ fail:
/* cbsDescribe -- describe a CBS
*
* See <design/land/#function.describe>.
* <design/land#.function.describe>.
*/
static Res cbsDescribe(Inst inst, mps_lib_FILE *stream, Count depth)

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .source: <design/cbs/>.
* .source: <design/cbs>.
*/
#ifndef cbs_h

View file

@ -196,8 +196,8 @@ extern unsigned CheckLevel;
/* TESTT -- check type simply
*
* Must be thread safe. See <design/interface-c/#thread-safety>
* and <design/interface-c/#check.space>.
* Must be thread safe. <design/interface-c#.thread-safety>
* and <design/interface-c#.check.space>.
*/
#define TESTT(type, val) ((val) != NULL && (val)->sig == type ## Sig)
@ -334,7 +334,7 @@ extern unsigned CheckLevel;
* verify that certain types and fields are equivalent. They do not do
* a complete job. This trickery is justified by the security gained
* in knowing that <code/mps.h> matches the MPM. See
* <design/interface-c/#check.types>. [This paragraph is intended to
* <design/interface-c#.check.types>. [This paragraph is intended to
* satisfy rule.impl.trick.]
*/

View file

@ -3,7 +3,7 @@
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
* $Id$
*
* .design: <design/clock/>.
* .design: <design/clock>.
*/
#ifndef clock_h

View file

@ -12,7 +12,7 @@
*
* DESIGN
*
* See <design/config/>.
* <design/config>.
*/
#ifndef config_h
@ -433,7 +433,7 @@
#define ARENA_MINIMUM_COLLECTABLE_SIZE ((Size)1000000)
/* ARENA_DEFAULT_COLLECTION_RATE is an estimate of the MPS's
* collection rate (in work per second; see <design/type/#work>), for
* collection rate (in work per second; see <design/type#.work>), for
* use in the case where there isn't enough data to use a measured
* value. */
@ -487,7 +487,7 @@
/* Currently StackProbe has a useful implementation only on Windows. */
#if defined(MPS_OS_W3) && !defined(CONFIG_PF_ANSI)
/* See <design/sp/#sol.depth.analysis> for a justification of this value. */
/* See <design/sp#.sol.depth.analysis> for a justification of this value. */
#define StackProbeDEPTH ((Size)500)
#else
#define StackProbeDEPTH ((Size)0)
@ -601,7 +601,7 @@
#if defined(MPS_OS_LI) || defined(MPS_OS_FR)
/* PTHREADEXT_SIGSUSPEND -- signal used to suspend a thread
* See <design/pthreadext/#impl.signals>
* <design/pthreadext#.impl.signals>
*/
#if defined(CONFIG_PTHREADEXT_SIGSUSPEND)
#define PTHREADEXT_SIGSUSPEND CONFIG_PTHREADEXT_SIGSUSPEND
@ -610,7 +610,7 @@
#endif
/* PTHREADEXT_SIGRESUME -- signal used to resume a thread
* See <design/pthreadext/#impl.signals>
* <design/pthreadext#.impl.signals>
*/
#if defined(CONFIG_PTHREADEXT_SIGRESUME)
#define PTHREADEXT_SIGRESUME CONFIG_PTHREADEXT_SIGRESUME
@ -691,12 +691,12 @@
/* Write barrier deferral
*
* See design.mps.write-barrier.deferral.
* <design/write-barrier#.deferral>.
*
* TODO: These settings were determined by trial and error, but should
* be based on measurement of the protection overhead on each
* platform. We know it's extremely different between macOS and
* Windows, for example. See design.mps.write-barrier.improv.by-os.
* Windows, for example. <design/write-barrier#.improv.by-os>.
*
* TODO: Consider basing the count on the amount of time that has
* passed in the mutator rather than the number of scans.

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
* .source: design.mps.object-debug
* .source: <design/object-debug>
*/
#include "dbgpool.h"
@ -161,7 +161,7 @@ static Res DebugPoolInit(Pool pool, Arena arena, PoolClass klass, ArgList args)
/* fencepost init */
/* @@@@ This parses a user argument, options, so it should really */
/* go through the MPS interface. The template needs to be copied */
/* into Addr memory, to avoid breaking <design/type/#addr.use>. */
/* into Addr memory, to avoid breaking <design/type#.addr.use>. */
debug->fenceSize = options->fenceSize;
if (debug->fenceSize != 0) {
/* Fenceposting turns on tagging */

View file

@ -1,6 +1,6 @@
/* dbgpool.h: POOL DEBUG MIXIN
*
* See <design/object-debug>.
* <design/object-debug>.
*
* $Id$
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
* .source: <design/object-debug/>
* .source: <design/object-debug>
*/
#include "dbgpool.h"
@ -21,7 +21,7 @@ void mps_pool_check_fenceposts(mps_pool_t mps_pool)
Pool pool = (Pool)mps_pool;
Arena arena;
/* TESTT not AVERT, see <design/interface-c/#check.space */
/* TESTT not AVERT, see <design/interface-c#.check.space */
AVER(TESTT(Pool, pool));
arena = PoolArena(pool);
@ -41,7 +41,7 @@ void mps_pool_check_free_space(mps_pool_t mps_pool)
Pool pool = (Pool)mps_pool;
Arena arena;
/* TESTT not AVERT, see <design/interface-c/#check.space */
/* TESTT not AVERT, see <design/interface-c#.check.space */
AVER(TESTT(Pool, pool));
arena = PoolArena(pool);

View file

@ -9,7 +9,7 @@
*
* DESIGN
*
* .design: <design/telemetry/>.
* .design: <design/telemetry>.
*/
#ifndef event_h

View file

@ -15,7 +15,7 @@
#include "clock.h"
/* Event Kinds --- see <design/telemetry/>
/* Event Kinds --- see <design/telemetry>
*
* All events are classified as being of one event type.
* They are small enough to be able to be used as members of a bit set.

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
*
* .source: <design/telemetry/>
* .source: <design/telemetry>
*
* .desc: This file declares macros that define the types of events and their
* properties.
@ -52,7 +52,7 @@
* When you retire an event type, don't delete it from the list, but
* set the "Used" column to FALSE. This serves as documentation for
* what the event code means in older logs, and prevents the codes
* being re-used. See <design/telemetry/#.reg.code>.
* being re-used. <design/telemetry/#.reg.code>.
*
* When you add an event type, you must also add an EVENT_*_PARAMS
* macro specifying its parameters.

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2014 Ravenbrook Limited. See end of file for license.
*
* .design: <design/failover/>
* .design: <design/failover>
*
* .critical: In manual-allocation-bound programs using MVFF, many of
* these functions are on the critical paths via mps_alloc (and then
@ -82,7 +82,7 @@ static Res failoverInsert(Range rangeReturn, Land land, Range range)
AVERT_CRITICAL(Range, range);
/* Provide more opportunities for coalescence. See
* <design/failover/#impl.assume.flush>.
* <design/failover#.impl.assume.flush>.
*/
(void)LandFlush(fo->primary, fo->secondary);
@ -104,7 +104,7 @@ static Res failoverInsertSteal(Range rangeReturn, Land land, Range rangeIO)
AVERT(Range, rangeIO);
/* Provide more opportunities for coalescence. See
* <design/failover/#impl.assume.flush>.
* <design/failover#.impl.assume.flush>.
*/
(void)LandFlush(fo->primary, fo->secondary);
@ -124,7 +124,7 @@ static Res failoverDelete(Range rangeReturn, Land land, Range range)
AVERT(Range, range);
/* Prefer efficient search in the primary. See
* <design/failover/#impl.assume.flush>.
* <design/failover#.impl.assume.flush>.
*/
(void)LandFlush(fo->primary, fo->secondary);
@ -144,7 +144,7 @@ static Res failoverDelete(Range rangeReturn, Land land, Range range)
/* Delete the whole of oldRange, and re-insert the fragments
* (which might end up in the secondary). See
* <design/failover/#impl.assume.delete>.
* <design/failover#.impl.assume.delete>.
*/
res = LandDelete(&dummyRange, fo->primary, &oldRange);
if (res != ResOK)
@ -191,7 +191,7 @@ static Res failoverDeleteSteal(Range rangeReturn, Land land, Range range)
AVERT(Range, range);
/* Prefer efficient search in the primary. See
* <design/failover/#impl.assume.flush>.
* <design/failover#.impl.assume.flush>.
*/
(void)LandFlush(fo->primary, fo->secondary);
@ -223,7 +223,7 @@ static Bool failoverFindFirst(Range rangeReturn, Range oldRangeReturn, Land land
AVER_CRITICAL(oldRangeReturn != NULL);
AVERT_CRITICAL(FindDelete, findDelete);
/* See <design/failover/#impl.assume.flush>. */
/* <design/failover#.impl.assume.flush>. */
(void)LandFlush(fo->primary, fo->secondary);
return LandFindFirst(rangeReturn, oldRangeReturn, fo->primary, size, findDelete)
@ -239,7 +239,7 @@ static Bool failoverFindLast(Range rangeReturn, Range oldRangeReturn, Land land,
AVER_CRITICAL(oldRangeReturn != NULL);
AVERT_CRITICAL(FindDelete, findDelete);
/* See <design/failover/#impl.assume.flush>. */
/* <design/failover#.impl.assume.flush>. */
(void)LandFlush(fo->primary, fo->secondary);
return LandFindLast(rangeReturn, oldRangeReturn, fo->primary, size, findDelete)
@ -255,7 +255,7 @@ static Bool failoverFindLargest(Range rangeReturn, Range oldRangeReturn, Land la
AVER_CRITICAL(oldRangeReturn != NULL);
AVERT_CRITICAL(FindDelete, findDelete);
/* See <design/failover/#impl.assume.flush>. */
/* <design/failover#.impl.assume.flush>. */
(void)LandFlush(fo->primary, fo->secondary);
return LandFindLargest(rangeReturn, oldRangeReturn, fo->primary, size, findDelete)
@ -276,7 +276,7 @@ static Bool failoverFindInZones(Bool *foundReturn, Range rangeReturn, Range oldR
/* AVERT_CRITICAL(ZoneSet, zoneSet); */
AVERT_CRITICAL(Bool, high);
/* See <design/failover/#impl.assume.flush>. */
/* <design/failover#.impl.assume.flush>. */
(void)LandFlush(fo->primary, fo->secondary);
res = LandFindInZones(&found, rangeReturn, oldRangeReturn, fo->primary, size, zoneSet, high);

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2014 Ravenbrook Limited. See end of file for license.
*
* .source: <design/failover/>.
* .source: <design/failover>.
*/
#ifndef failover_h

View file

@ -6,7 +6,7 @@
*
* DESIGN
*
* See <design/poolmrg/#test>.
* <design/poolmrg#.test>.
*
* DEPENDENCIES
*
@ -132,7 +132,7 @@ static void test(mps_arena_t arena, mps_pool_class_t pool_class)
die(mps_ap_create(&ap, pool, mps_rank_exact()), "ap_create\n");
/* Make registered-for-finalization objects. */
/* <design/poolmrg/#test.promise.ut.alloc> */
/* <design/poolmrg#.test.promise.ut.alloc> */
for(i = 0; i < rootCOUNT; ++i) {
do {
MPS_RESERVE_BLOCK(e, p, ap, vectorSIZE);
@ -155,7 +155,7 @@ static void test(mps_arena_t arena, mps_pool_class_t pool_class)
mps_message_type_enable(arena, mps_message_type_finalization());
mps_message_type_enable(arena, mps_message_type_gc());
/* <design/poolmrg/#test.promise.ut.churn> */
/* <design/poolmrg#.test.promise.ut.churn> */
while (finalizations < finalizationCOUNT && collections < collectionCOUNT) {
mps_message_type_t type;
@ -163,7 +163,7 @@ static void test(mps_arena_t arena, mps_pool_class_t pool_class)
churn(ap);
/* Maybe make some objects ready-to-finalize */
/* <design/poolmrg/#test.promise.ut.drop> */
/* <design/poolmrg#.test.promise.ut.drop> */
for (i = 0; i < rootCOUNT; ++i) {
if (root[i] != NULL && state[i] == rootSTATE) {
if (rnd() % finalizationRATE == 0) {
@ -192,7 +192,7 @@ static void test(mps_arena_t arena, mps_pool_class_t pool_class)
mps_word_t objind;
mps_addr_t objaddr;
/* <design/poolmrg/#test.promise.ut.message> */
/* <design/poolmrg#.test.promise.ut.message> */
cdie(0 == mps_message_clock(arena, message),
"message clock should be 0 (unset) for finalization messages");
mps_message_finalization_ref(&objaddr, arena, message);
@ -200,7 +200,7 @@ static void test(mps_arena_t arena, mps_pool_class_t pool_class)
objind = dylan_int_int(obj[vectorSLOT]);
printf("Finalizing: object %"PRIuLONGEST" at %p\n",
(ulongest_t)objind, objaddr);
/* <design/poolmrg/#test.promise.ut.final.check> */
/* <design/poolmrg#.test.promise.ut.final.check> */
cdie(root[objind] == NULL, "finalized live");
cdie(state[objind] == finalizableSTATE, "finalized dead");
state[objind] = finalizedSTATE;

View file

@ -182,7 +182,7 @@ void FormatDestroy(Format format)
/* FormatArena -- find the arena of a format
*
* Must be thread-safe. See <design/interface-c/#check.testt>. */
* Must be thread-safe. <design/interface-c#.check.testt>. */
Arena FormatArena(Format format)
{

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2013-2015 Ravenbrook Limited. See end of file for license.
*
* .sources: <design/freelist/>.
* .sources: <design/freelist>.
*/
#include "freelist.h"
@ -176,7 +176,7 @@ Bool FreelistCheck(Freelist fl)
CHECKL(AlignCheck(FreelistMinimumAlignment));
CHECKL(sizeof(struct FreelistBlockSmall) < sizeof(struct FreelistBlockLarge));
CHECKL(sizeof(struct FreelistBlockSmall) <= freelistAlignment(fl));
/* See <design/freelist/#impl.grain.align> */
/* <design/freelist#.impl.grain.align> */
CHECKL(AlignIsAligned(freelistAlignment(fl), FreelistMinimumAlignment));
CHECKL((fl->list == freelistEND) == (fl->listSize == 0));
CHECKL((fl->list == freelistEND) == (fl->size == 0));
@ -197,7 +197,7 @@ static Res freelistInit(Land land, Arena arena, Align alignment, ArgList args)
return res;
fl = CouldBeA(Freelist, land);
/* See <design/freelist/#impl.grain> */
/* <design/freelist#.impl.grain> */
AVER(AlignIsAligned(LandAlignment(land), FreelistMinimumAlignment));
fl->list = freelistEND;
@ -254,7 +254,7 @@ static void freelistBlockSetPrevNext(Freelist fl, FreelistBlock prev,
if (prev == freelistEND) {
fl->list = next;
} else {
/* Isolated range invariant (design.mps.freelist.impl.invariant). */
/* Isolated range invariant <design/freelist#.impl.invariant>. */
AVER(next == freelistEND
|| freelistBlockLimit(fl, prev) < freelistBlockBase(next));
freelistBlockSetNext(prev, next);
@ -291,7 +291,7 @@ static Res freelistInsert(Range rangeReturn, Land land, Range range)
break;
next = freelistBlockNext(cur);
if (next != freelistEND)
/* Isolated range invariant (design.mps.freelist.impl.invariant). */
/* Isolated range invariant <design/freelist#.impl.invariant>. */
AVER(freelistBlockLimit(fl, cur) < freelistBlockBase(next));
prev = cur;
cur = next;

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2013-2014 Ravenbrook Limited. See end of file for license.
*
* .source: <design/freelist/>.
* .source: <design/freelist>.
*/
#ifndef freelist_h
@ -19,7 +19,7 @@ typedef struct FreelistStruct *Freelist;
extern Bool FreelistCheck(Freelist freelist);
/* See <design/freelist/#impl.grain.align> */
/* <design/freelist#.impl.grain.align> */
#define FreelistMinimumAlignment ((Align)sizeof(FreelistBlock))
DECLARE_CLASS(Land, Freelist, Land);

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
* .sources: See <design/arena/>. design.mps.thread-safety is relevant
* .sources: <design/arena>. <design/thread-safety> is relevant
* to the functions ArenaEnter and ArenaLeave in this file.
*
*
@ -12,10 +12,10 @@
*
* .static: Static data is used in ArenaAccess (in order to find the
* appropriate arena) and GlobalsInit. It's checked in GlobalsCheck.
* See <design/arena/#static>.
* <design/arena#.static>.
*
* .non-mod: The Globals structure has many fields which properly belong
* to other modules (see <code/mpmst.h>); GlobalsInit contains code which
* to other modules <code/mpmst.h>; GlobalsInit contains code which
* breaks the usual module abstractions. Such instances are documented
* with a tag to the relevant module implementation. Most of the
* functions should be in some other module, they just ended up here by
@ -31,15 +31,15 @@ SRCID(global, "$Id$");
/* All static data objects are declared here. See .static */
/* <design/arena/#static.ring.init> */
/* <design/arena#.static.ring.init> */
static Bool arenaRingInit = FALSE;
static RingStruct arenaRing; /* <design/arena/#static.ring> */
static Serial arenaSerial; /* <design/arena/#static.serial> */
static RingStruct arenaRing; /* <design/arena#.static.ring> */
static Serial arenaSerial; /* <design/arena#.static.serial> */
/* arenaClaimRingLock, arenaReleaseRingLock -- lock/release the arena ring
*
* See <design/arena/#static.ring.lock>. */
* <design/arena#.static.ring.lock>. */
static void arenaClaimRingLock(void)
{
@ -53,7 +53,7 @@ static void arenaReleaseRingLock(void)
/* GlobalsClaimAll -- claim all MPS locks
* <design/thread-safety/#sol.fork.lock>
* <design/thread-safety#.sol.fork.lock>
*/
void GlobalsClaimAll(void)
@ -64,7 +64,7 @@ void GlobalsClaimAll(void)
}
/* GlobalsReleaseAll -- release all MPS locks. GlobalsClaimAll must
* previously have been called. <design/thread-safety/#sol.fork.lock> */
* previously have been called. <design/thread-safety#.sol.fork.lock> */
void GlobalsReleaseAll(void)
{
@ -84,7 +84,7 @@ static void arenaReinitLock(Arena arena)
/* GlobalsReinitializeAll -- reinitialize all MPS locks, and leave the
* shield for all arenas. GlobalsClaimAll must previously have been
* called. <design/thread-safety/#sol.fork.lock> */
* called. <design/thread-safety#.sol.fork.lock> */
void GlobalsReinitializeAll(void)
{
@ -127,7 +127,7 @@ static void arenaDenounce(Arena arena)
AVERT(Arena, arena);
/* Temporarily give up the arena lock to avoid deadlock, */
/* see <design/thread-safety/#deadlock>. */
/* see <design/thread-safety#.deadlock>. */
ArenaLeave(arena);
/* Detach the arena from the global list. */
@ -214,14 +214,14 @@ Bool GlobalsCheck(Globals arenaGlobals)
CHECKL(TraceSetSuper(arena->busyTraces, arena->flippedTraces));
TRACE_SET_ITER(ti, trace, TraceSetUNIV, arena)
/* <design/arena/#trace> */
/* <design/arena#.trace> */
if (TraceSetIsMember(arena->busyTraces, trace)) {
CHECKD(Trace, trace);
} else {
/* <design/arena/#trace.invalid> */
/* <design/arena#.trace.invalid> */
CHECKL(trace->sig == SigInvalid);
}
/* <design/message-gc/> */
/* <design/message-gc> */
CHECKL(TraceIdMessagesCheck(arena, ti));
TRACE_SET_ITER_END(ti, trace, TraceSetUNIV, arena);
@ -236,7 +236,7 @@ Bool GlobalsCheck(Globals arenaGlobals)
/* can't write a check for arena->epoch */
CHECKD(History, ArenaHistory(arena));
/* we also check the statics now. <design/arena/#static.check> */
/* we also check the statics now. <design/arena#.static.check> */
CHECKL(BoolCheck(arenaRingInit));
/* Can't CHECKD_NOSIG here because &arenaRing is never NULL and GCC
* will warn about a constant comparison. */
@ -272,7 +272,7 @@ Res GlobalsInit(Globals arenaGlobals)
/* Ensure static things are initialized. */
if (!arenaRingInit) {
/* there isn't an arena ring yet */
/* <design/arena/#static.init> */
/* <design/arena#.static.init> */
arenaRingInit = TRUE;
RingInit(&arenaRing);
arenaSerial = (Serial)0;
@ -336,11 +336,11 @@ Res GlobalsInit(Globals arenaGlobals)
ShieldInit(ArenaShield(arena));
for (ti = 0; ti < TraceLIMIT; ++ti) {
/* <design/arena/#trace.invalid> */
/* <design/arena#.trace.invalid> */
arena->trace[ti].sig = SigInvalid;
/* ti must be valid so that TraceSetIsMember etc. always work */
arena->trace[ti].ti = ti;
/* <design/message-gc/#lifecycle> */
/* <design/message-gc#.lifecycle> */
arena->tsMessage[ti] = NULL;
arena->tMessage[ti] = NULL;
}
@ -379,7 +379,7 @@ Res GlobalsCompleteCreate(Globals arenaGlobals)
AVERT(Globals, arenaGlobals);
arena = GlobalsArena(arenaGlobals);
/* initialize the message stuff, <design/message/> */
/* initialize the message stuff, <design/message> */
{
void *v;
@ -391,7 +391,7 @@ Res GlobalsCompleteCreate(Globals arenaGlobals)
}
TRACE_SET_ITER(ti, trace, TraceSetUNIV, arena)
/* <design/message-gc/#lifecycle> */
/* <design/message-gc#.lifecycle> */
res = TraceIdMessagesCreate(arena, ti);
if(res != ResOK)
return res;
@ -494,7 +494,7 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals)
arenaGlobals->lock = NULL;
TRACE_SET_ITER(ti, trace, TraceSetUNIV, arena)
/* <design/message-gc/#lifecycle> */
/* <design/message-gc#.lifecycle> */
TraceIdMessagesDestroy(arena, ti);
TRACE_SET_ITER_END(ti, trace, TraceSetUNIV, arena);
@ -518,7 +518,7 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals)
arena->enabledMessageTypes = NULL;
}
/* destroy the final pool (see <design/finalize/>) */
/* destroy the final pool <design/finalize> */
if (arena->isFinalPool) {
/* All this subtlety is because PoolDestroy will call */
/* ArenaCheck several times. The invariant on finalPool */
@ -628,7 +628,7 @@ void ArenaLeaveLock(Arena arena, Bool recursive)
} else {
ShieldLeave(arena);
}
ProtSync(arena); /* <design/prot/#if.sync> */
ProtSync(arena); /* <design/prot#.if.sync> */
if(recursive) {
LockReleaseRecursive(lock);
} else {
@ -659,7 +659,7 @@ Bool ArenaAccess(Addr addr, AccessSet mode, MutatorContext context)
Ring node, nextNode;
Res res;
arenaClaimRingLock(); /* <design/arena/#lock.ring> */
arenaClaimRingLock(); /* <design/arena#.lock.ring> */
AVERT(Ring, &arenaRing);
RING_FOR(node, &arenaRing, nextNode) {
@ -667,7 +667,7 @@ Bool ArenaAccess(Addr addr, AccessSet mode, MutatorContext context)
Arena arena = GlobalsArena(arenaGlobals);
Root root;
ArenaEnter(arena); /* <design/arena/#lock.arena> */
ArenaEnter(arena); /* <design/arena#.lock.arena> */
EVENT3(ArenaAccessBegin, arena, addr, mode);
/* @@@@ The code below assumes that Roots and Segs are disjoint. */
@ -835,7 +835,7 @@ Bool ArenaStep(Globals globals, double interval, double multiplier)
/* ArenaFinalize -- registers an object for finalization
*
* See <design/finalize/>. */
* <design/finalize>. */
Res ArenaFinalize(Arena arena, Ref obj)
{
@ -863,7 +863,7 @@ Res ArenaFinalize(Arena arena, Ref obj)
/* ArenaDefinalize -- removes one finalization registration of an object
*
* See <design/finalize>. */
* <design/finalize>. */
Res ArenaDefinalize(Arena arena, Ref obj)
{

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2014-2016 Ravenbrook Limited. See end of file for license.
*
* .design: <design/land/>
* .design: <design/land>
*
* .critical.macros: In manual-allocation-bound programs using MVFF,
* the Land generic functions are on the critical path via mps_free.
@ -112,7 +112,7 @@ static void LandAbsFinish(Inst inst)
/* LandInit -- initialize land
*
* See <design/land/#function.init>
* <design/land#.function.init>
*/
Res LandInit(Land land, LandClass klass, Arena arena, Align alignment, void *owner, ArgList args)
@ -135,7 +135,7 @@ Res LandInit(Land land, LandClass klass, Arena arena, Align alignment, void *own
/* LandFinish -- finish land
*
* See <design/land/#function.finish>
* <design/land#.function.finish>
*/
void LandFinish(Land land)
@ -149,7 +149,7 @@ void LandFinish(Land land)
/* LandSize -- return the total size of ranges in land
*
* See <design/land/#function.size>
* <design/land#.function.size>
*/
Size (LandSize)(Land land)
@ -163,7 +163,7 @@ Size (LandSize)(Land land)
/* LandInsert -- insert range of addresses into land
*
* See <design/land/#function.insert>
* <design/land#.function.insert>
*/
Res (LandInsert)(Range rangeReturn, Land land, Range range)
@ -188,7 +188,7 @@ Res (LandInsert)(Range rangeReturn, Land land, Range range)
* stealing some of the inserted memory to allocate internal data
* structures.
*
* See <design/land/#function.insert-steal>
* <design/land#.function.insert-steal>
*/
Res LandInsertSteal(Range rangeReturn, Land land, Range rangeIO)
@ -213,7 +213,7 @@ Res LandInsertSteal(Range rangeReturn, Land land, Range rangeIO)
/* LandDelete -- delete range of addresses from land
*
* See <design/land/#function.delete>
* <design/land#.function.delete>
*/
Res (LandDelete)(Range rangeReturn, Land land, Range range)
@ -238,7 +238,7 @@ Res (LandDelete)(Range rangeReturn, Land land, Range range)
* stealing some memory from the land to allocate internal data
* structures.
*
* See <design/land/#function.delete-steal>
* <design/land#.function.delete-steal>
*/
Res LandDeleteSteal(Range rangeReturn, Land land, Range range)
@ -261,7 +261,7 @@ Res LandDeleteSteal(Range rangeReturn, Land land, Range range)
/* LandIterate -- iterate over isolated ranges of addresses in land
*
* See <design/land/#function.iterate>
* <design/land#.function.iterate>
*/
Bool (LandIterate)(Land land, LandVisitor visitor, void *closure)
@ -281,7 +281,7 @@ Bool (LandIterate)(Land land, LandVisitor visitor, void *closure)
/* LandIterateAndDelete -- iterate over isolated ranges of addresses
* in land, deleting some of them
*
* See <design/land/#function.iterate.and.delete>
* <design/land#.function.iterate.and.delete>
*/
Bool (LandIterateAndDelete)(Land land, LandDeleteVisitor visitor, void *closure)
@ -300,7 +300,7 @@ Bool (LandIterateAndDelete)(Land land, LandDeleteVisitor visitor, void *closure)
/* LandFindFirst -- find first range of given size
*
* See <design/land/#function.find.first>
* <design/land#.function.find.first>
*/
Bool (LandFindFirst)(Range rangeReturn, Range oldRangeReturn, Land land, Size size, FindDelete findDelete)
@ -323,7 +323,7 @@ Bool (LandFindFirst)(Range rangeReturn, Range oldRangeReturn, Land land, Size si
/* LandFindLast -- find last range of given size
*
* See <design/land/#function.find.last>
* <design/land#.function.find.last>
*/
Bool (LandFindLast)(Range rangeReturn, Range oldRangeReturn, Land land, Size size, FindDelete findDelete)
@ -346,7 +346,7 @@ Bool (LandFindLast)(Range rangeReturn, Range oldRangeReturn, Land land, Size siz
/* LandFindLargest -- find largest range of at least given size
*
* See <design/land/#function.find.largest>
* <design/land#.function.find.largest>
*/
Bool (LandFindLargest)(Range rangeReturn, Range oldRangeReturn, Land land, Size size, FindDelete findDelete)
@ -369,7 +369,7 @@ Bool (LandFindLargest)(Range rangeReturn, Range oldRangeReturn, Land land, Size
/* LandFindInSize -- find range of given size in set of zones
*
* See <design/land/#function.find.zones>
* <design/land#.function.find.zones>
*/
Res (LandFindInZones)(Bool *foundReturn, Range rangeReturn, Range oldRangeReturn, Land land, Size size, ZoneSet zoneSet, Bool high)
@ -395,7 +395,7 @@ Res (LandFindInZones)(Bool *foundReturn, Range rangeReturn, Range oldRangeReturn
/* LandDescribe -- describe land for debugging
*
* See <design/land/#function.describe>
* <design/land#.function.describe>
*/
Res LandDescribe(Land land, mps_lib_FILE *stream, Count depth)
@ -440,7 +440,7 @@ Bool LandFlushVisitor(Bool *deleteReturn, Land land, Range range,
/* LandFlush -- move ranges from src to dest
*
* See <design/land/#function.flush>
* <design/land#.function.flush>
*/
Bool (LandFlush)(Land dest, Land src)

View file

@ -34,7 +34,7 @@
*
* .mod: LDHistoryLENGTH is used as a modulus to calculate the offset
* of an epoch in the history, so it's best if this is a power of two.
* (<code/mpmconf.h>)
* <code/mpmconf.h>
*
* .epoch-size: The epoch should probably be a longer integer to avoid
* the possibility of overflow.

View file

@ -18,7 +18,7 @@ SRCID(lockan, "$Id$");
typedef struct LockStruct { /* ANSI fake lock structure */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
unsigned long claims; /* # claims held by owner */
} LockStruct;

View file

@ -51,7 +51,7 @@ SRCID(lockix, "$Id$");
*/
typedef struct LockStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
unsigned long claims; /* # claims held by owner */
pthread_mutex_t mut; /* the mutex itself */
} LockStruct;
@ -264,7 +264,7 @@ void (LockReleaseGlobal)(void)
void LockSetup(void)
{
/* Claim all locks before a fork; release in the parent;
reinitialize in the child <design/thread-safety/#sol.fork.lock> */
reinitialize in the child <design/thread-safety#.sol.fork.lock> */
pthread_atfork(GlobalsClaimAll, GlobalsReleaseAll, GlobalsReinitializeAll);
}

View file

@ -35,7 +35,7 @@ SRCID(lockw3, "$Id$");
/* .lock.win32: Win32 lock structure; uses CRITICAL_SECTION */
typedef struct LockStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
unsigned long claims; /* # claims held by the owning thread */
CRITICAL_SECTION cs; /* Win32's recursive lock thing */
} LockStruct;

View file

@ -5,8 +5,8 @@
*
* DESIGN
*
* See <design/arenavm/> and <design/locus/> for basic locus stuff.
* See <design/trace/> for chains. See <design/strategy/> for the
* <design/arenavm> and <design/locus> for basic locus stuff.
* <design/trace> for chains. <design/strategy> for the
* collection strategy.
*/
@ -649,7 +649,7 @@ Res PoolGenAlloc(Seg *segReturn, PoolGen pgen, SegClass klass, Size size,
* Call this when the pool allocates memory to the client program via
* BufferFill.
*
* See <design/strategy/#accounting.op.fill>
* <design/strategy#.accounting.op.fill>
*/
void PoolGenAccountForFill(PoolGen pgen, Size size)
@ -669,7 +669,7 @@ void PoolGenAccountForFill(PoolGen pgen, Size size)
* the used memory (for the purpose of scheduling collections) should
* be deferred until later.
*
* See <design/strategy/#accounting.op.empty>
* <design/strategy#.accounting.op.empty>
*/
void PoolGenAccountForEmpty(PoolGen pgen, Size used, Size unused, Bool deferred)
@ -695,7 +695,7 @@ void PoolGenAccountForEmpty(PoolGen pgen, Size used, Size unused, Bool deferred)
* should be the amount of memory that is being condemned for the
* first time. The deferred flag is as for PoolGenAccountForEmpty.
*
* See <design/strategy/#accounting.op.age>
* <design/strategy#.accounting.op.age>
*/
void PoolGenAccountForAge(PoolGen pgen, Size wasBuffered, Size wasNew,
@ -723,7 +723,7 @@ void PoolGenAccountForAge(PoolGen pgen, Size wasBuffered, Size wasNew,
* Call this when reclaiming memory, passing the amount of memory that
* was reclaimed. The deferred flag is as for PoolGenAccountForEmpty.
*
* See <design/strategy/#accounting.op.reclaim>
* <design/strategy#.accounting.op.reclaim>
*/
void PoolGenAccountForReclaim(PoolGen pgen, Size reclaimed, Bool deferred)
@ -748,7 +748,7 @@ void PoolGenAccountForReclaim(PoolGen pgen, Size reclaimed, Bool deferred)
* (condemned at least once) and new (never condemned) memory whose
* accounting was deferred (for example, during a ramp).
*
* See <design/strategy/#accounting.op.undefer>
* <design/strategy#.accounting.op.undefer>
*/
void PoolGenUndefer(PoolGen pgen, Size oldSize, Size newSize)
@ -809,7 +809,7 @@ static void PoolGenAccountForFree(PoolGen pgen, Size size,
* old, or new, respectively. The deferred flag is as for
* PoolGenAccountForEmpty.
*
* See <design/strategy/#accounting.op.free>
* <design/strategy#.accounting.op.free>
*/
void PoolGenFree(PoolGen pgen, Seg seg, Size freeSize, Size oldSize,

View file

@ -41,7 +41,7 @@ typedef struct GenDescStruct *GenDesc;
#define GenDescSig ((Sig)0x5199E4DE) /* SIGnature GEN DEsc */
typedef struct GenDescStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
Serial serial; /* serial number within arena */
ZoneSet zones; /* zoneset for this generation */
Size capacity; /* capacity in bytes */

View file

@ -5,7 +5,7 @@
*
* DESIGN
*
* .design: See <design/message/> (it really exists).
* .design: <design/message> (it really exists).
*
* PURPOSE
*
@ -128,7 +128,7 @@ void MessagePost(Arena arena, Message message)
AVERT(Message, message);
/* queueRing field must be a singleton, see */
/* <design/message/#fun.post.singleton> */
/* <design/message#.fun.post.singleton> */
AVER(!MessageOnQueue(message));
if(MessageTypeEnabled(arena, MessageGetType(message))) {
/* .message.clocked: Reading the clock with ClockNow() */

View file

@ -37,7 +37,7 @@ static MessageClassStruct DFMessageClassStruct = {
MessageNoGCCondemnedSize, /* GCCondemnedSize */
MessageNoGCNotCondemnedSize, /* GCNotCondemnedSize */
MessageNoGCStartWhy, /* GCStartWhy */
MessageClassSig /* <design/message/#class.sig.double> */
MessageClassSig /* <design/message#.class.sig.double> */
};
@ -53,7 +53,7 @@ static MessageClassStruct DGCMessageClassStruct = {
MessageNoGCCondemnedSize, /* GCCondemnedSize */
MessageNoGCNotCondemnedSize, /* GCNoteCondemnedSize */
MessageNoGCStartWhy, /* GCStartWhy */
MessageClassSig /* <design/message/#class.sig.double> */
MessageClassSig /* <design/message#.class.sig.double> */
};

View file

@ -14,7 +14,7 @@
#define misc_h
typedef int Bool; /* <design/type/#bool> */
typedef int Bool; /* <design/type#.bool> */
enum BoolEnum {
FALSE = 0,
TRUE = 1
@ -176,7 +176,7 @@ typedef const struct SrcIdStruct {
* Given a pointer to a field of a structure this returns a pointer to
* the main structure. PARENT(foo_t, x, &(foo->x)) == foo.
*
* This macro is thread-safe, see design.mps.misc.parent.thread-safe.
* This macro is thread-safe, see <design/misc#.parent.thread-safe>.
*
* That intermediate (void *) is required to stop some compilers complaining
* about alignment of 'type *' being greater than that of 'char *'. Which
@ -196,7 +196,7 @@ typedef const struct SrcIdStruct {
* conversion (which would be a compiler error) when assigning TRUE to
* the field.
*
* See <design/type/#bool.bitfield>
* <design/type#.bool.bitfield>
*/
#define BOOLFIELD(name) unsigned name : 1
@ -215,7 +215,7 @@ typedef const struct SrcIdStruct {
*
* Can be used on any unsigned integral type, ty. These definitions
* are _syntactic_, hence macroid, hence upper case
* (guide.c.naming.macro.special).
* <design/guide.impl.c.naming#.capital.macro>.
*/
#define BS_EMPTY(ty) ((ty)0)

View file

@ -6,7 +6,7 @@
* .purpose: Miscellaneous support for the implementation of the MPM
* and pool classes.
*
* .sources: <design/writef/> */
* .sources: <design/writef> */
#include "check.h"
#include "misc.h"
@ -86,7 +86,7 @@ Bool MPMCheck(void)
CHECKL(PageSize() % ProtGranularity() == 0);
/* StackProbe mustn't skip over the stack guard page. See
* <design/sp/#sol.depth.constraint>. */
* <design/sp#.sol.depth.constraint>. */
CHECKL(StackProbeDEPTH * sizeof(Word) < PageSize());
/* Check these values will fit in their bitfield. */
@ -446,7 +446,7 @@ static Res WriteDouble(mps_lib_FILE *stream, double d)
/* WriteF -- write formatted output
*
* .writef.des: See <design/writef/>, also <design/lib/>
* .writef.des: <design/writef>, also <design/lib>
*
* .writef.p: There is an assumption that void * fits in Word in
* the case of $P, and ULongest for $U and $B. This is checked in

View file

@ -44,7 +44,7 @@ extern Bool MPMCheck(void);
/* Miscellaneous Checks -- see <code/mpm.c> */
/* <design/type/#bool.check> */
/* <design/type#.bool.check> */
#define BoolCheck(b) ((unsigned)(b) <= 1)
extern Bool FunCheck(Fun f);
@ -116,7 +116,7 @@ extern Addr (AddrAlignDown)(Addr addr, Align align);
extern Addr (AddrSet)(Addr target, Byte value, Size size);
/* This is one of the places that implements Addr, so it's allowed to */
/* convert to void *, see <design/type/#addr.ops.mem>. */
/* convert to void *, see <design/type#.addr.ops.mem>. */
#define AddrSet(target, value, size) \
mps_lib_memset(target, (int)(value), size)
@ -164,7 +164,7 @@ extern Shift SizeFloorLog2(Size size);
extern Bool (WordIsP2)(Word word);
#define WordIsP2(word) ((word) > 0 && ((word) & ((word) - 1)) == 0)
/* Formatted Output -- see <design/writef/>, <code/mpm.c> */
/* Formatted Output -- see <design/writef>, <code/mpm.c> */
extern Res WriteF(mps_lib_FILE *stream, Count depth, ...);
extern Res WriteF_v(mps_lib_FILE *stream, Count depth, va_list args);
@ -190,12 +190,12 @@ extern void QuickSort(void *array[], Count length,
/* Version Determination
*
* See <design/version-library/>. */
* <design/version-library>. */
extern char *MPSVersion(void);
/* Pool Interface -- see impl.c.pool */
/* Pool Interface -- see <code/pool.c> */
extern Res PoolInit(Pool pool, Arena arena, PoolClass klass, ArgList args);
extern void PoolFinish(Pool pool);
@ -203,7 +203,7 @@ extern Bool PoolClassCheck(PoolClass klass);
extern Bool PoolCheck(Pool pool);
extern Res PoolDescribe(Pool pool, mps_lib_FILE *stream, Count depth);
/* Must be thread-safe. See <design/interface-c/#thread-safety>. */
/* Must be thread-safe. <design/interface-c#.thread-safety>. */
#define PoolArena(pool) ((pool)->arena)
#define PoolAlignment(pool) ((pool)->alignment)
#define PoolSegRing(pool) (&(pool)->segRing)
@ -286,7 +286,7 @@ typedef Pool AbstractCollectPool;
DECLARE_CLASS(Pool, AbstractCollectPool, AbstractSegBufPool);
/* Message Interface -- see <design/message/> */
/* Message Interface -- see <design/message> */
/* -- Internal (MPM) Interface -- functions for message originator */
extern Bool MessageCheck(Message message);
extern Bool MessageClassCheck(MessageClass klass);
@ -835,7 +835,7 @@ extern Bool RankSetCheck(RankSet rankSet);
#define RefSetSub(rs1, rs2) BS_SUB((rs1), (rs2))
/* Zone sets -- see design.mps.refset */
/* Zone sets -- see <design/refset> */
#define ZoneSetUnion(zs1, zs2) BS_UNION(zs1, zs2)
#define ZoneSetInter(zs1, zs2) BS_INTER(zs1, zs2)
@ -963,7 +963,7 @@ typedef Res (*RootIterateFn)(Root root, void *p);
extern Res RootsIterate(Globals arena, RootIterateFn f, void *p);
/* Land Interface -- see <design/land/> */
/* Land Interface -- see <design/land> */
extern Bool LandCheck(Land land);
#define LandArena(land) ((land)->arena)
@ -1017,7 +1017,7 @@ DECLARE_CLASS(Land, Land, Inst);
/* STATISTIC -- gather statistics (in some varieties)
*
* See <design/diag/#stat>.
* <design/diag#.stat>.
*/
#if defined(STATISTICS)

View file

@ -10,13 +10,12 @@
*
* .structure: Most structures have already been declared as incomplete
* types in <code/mpmtypes.h>. Most of the structures are the underlying
* aggregate types for an abstract data type. See
* guide.impl.c.naming.type.adt-aggregate.relate.
* aggregate types for an abstract data type.
*
* .rationale.sig: Object signatures (PoolSig, etc.) are defined here,
* along with the structures, so that any code which can see a structure
* can also check its signature before using any of its fields. See
* <design/sig/#test.uniq> to check that signatures are unique. */
* <design/sig#.test.uniq> to check that signatures are unique. */
#ifndef mpmst_h
#define mpmst_h
@ -33,15 +32,15 @@
/* PoolClassStruct -- pool class structure
*
* See <design/pool/>.
* <design/pool>.
*
* .class: The pool class structure is defined by each pool class
* implementation in order to provide an interface between the MPM and
* the class (see <design/pool/>) via generic functions (see
* <code/pool.c>). Pool classes use the class protocol (see
* <design/protocol/>) and so CLASS(ABCPool) returns a PoolClass
* pointing to a PoolClassStruct of methods which implement the memory
* management policy for pool class ABC.
* the class <design/pool> via generic functions <code/pool.c>. Pool
* classes use the class protocol <design/protocol> and so
* CLASS(ABCPool) returns a PoolClass pointing to a PoolClassStruct of
* methods which implement the memory management policy for pool class
* ABC.
*
* .class.end-sig: The class structure has a signature at the end. This
* causes the compiler to complain if the class structure is extended
@ -80,14 +79,14 @@ typedef struct mps_pool_class_s {
* a "subclass" of the pool structure (the "outer structure") which
* contains PoolStruct as a a field. The outer structure holds the
* class-specific part of the pool's state. See <code/pool.c>,
* <design/pool/>.
* <design/pool>.
*/
#define PoolSig ((Sig)0x519B0019) /* SIGnature POOL */
typedef struct mps_pool_s { /* generic structure */
InstStruct instStruct;
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
Serial serial; /* from arena->poolSerial */
Arena arena; /* owning arena */
RingStruct arenaRing; /* link in list of pools in arena */
@ -102,14 +101,14 @@ typedef struct mps_pool_s { /* generic structure */
/* MFSStruct -- MFS (Manual Fixed Small) pool outer structure
*
* .mfs: See <code/poolmfs.c>, <design/poolmfs/>.
* .mfs: See <code/poolmfs.c>, <design/poolmfs>.
*
* The MFS outer structure is declared here because it is inlined
* in the control pool structure which is inlined in the arena. Normally,
* pool outer structures are declared with the pools.
*
* The signature is placed at the end, see
* <design/pool/#outer-structure.sig>. */
* <design/pool#.outer-structure.sig>. */
#define MFSSig ((Sig)0x5193F599) /* SIGnature MFS */
@ -123,19 +122,20 @@ typedef struct MFSStruct { /* MFS outer structure */
Size total; /* total size allocated from arena */
Size free; /* free space in pool */
RingStruct extentRing; /* ring of extents in pool */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} MFSStruct;
/* MessageClassStruct -- Message Class structure
*
* See <design/message/#class.struct> (and <design/message/#message>,
* and <design/message/#class>). */
* <design/message#.class.struct>, <design/message#.message>,
* and <design/message#.class>.
*/
#define MessageClassSig ((Sig)0x519359c1) /* SIGnature MeSsaGe CLass */
typedef struct MessageClassStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
const char *name; /* Human readable Class name */
MessageType type; /* Message Type */
@ -154,17 +154,17 @@ typedef struct MessageClassStruct {
/* methods specific to MessageTypeGCSTART */
MessageGCStartWhyMethod gcStartWhy;
Sig endSig; /* <design/message/#class.sig.double> */
Sig endSig; /* <design/message#.class.sig.double> */
} MessageClassStruct;
#define MessageSig ((Sig)0x5193e559) /* SIG MESSaGe */
/* MessageStruct -- Message structure
*
* See <design/message/#message.struct>. */
* <design/message#.message.struct>. */
typedef struct mps_message_s {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
Arena arena; /* owning arena */
MessageClass klass; /* Message Class Structure */
Clock postedClock; /* mps_clock() at post time, or 0 */
@ -174,7 +174,7 @@ typedef struct mps_message_s {
/* SegClassStruct -- segment class structure
*
* See <design/seg/> & <design/protocol/>.
* <design/seg> & <design/protocol>.
*
* .seg.class: The segment class structure is defined by each segment
* class implementation in order to provide a generic interface to
@ -215,7 +215,7 @@ typedef struct SegClassStruct {
/* SegStruct -- segment structure
*
* .seg: Segments are the basic units of protection and tracer activity
* for allocated memory. See <design/seg/>. */
* for allocated memory. <design/seg>. */
#define SegSig ((Sig)0x5195E999) /* SIGnature SEG */
@ -225,7 +225,7 @@ typedef struct SegStruct { /* segment structure */
Tract firstTract; /* first tract of segment */
RingStruct poolRing; /* link in list of segs in pool */
Addr limit; /* limit of segment */
unsigned depth : ShieldDepthWIDTH; /* see design.mps.shield.def.depth */
unsigned depth : ShieldDepthWIDTH; /* see <design/shield#.def.depth> */
BOOLFIELD(queued); /* in shield queue? */
AccessSet pm : AccessLIMIT; /* protection mode, <code/shield.c> */
AccessSet sm : AccessLIMIT; /* shield mode, <code/shield.c> */
@ -240,7 +240,7 @@ typedef struct SegStruct { /* segment structure */
/* GCSegStruct -- GCable segment structure
*
* .seggc: GCSeg is a subclass of Seg with support for buffered
* allocation and GC. See <design/seg/>. */
* allocation and GC. <design/seg>. */
#define GCSegSig ((Sig)0x5199C5E9) /* SIGnature GC SEG */
@ -250,7 +250,7 @@ typedef struct GCSegStruct { /* GC segment structure */
RefSet summary; /* summary of references out of seg */
Buffer buffer; /* non-NULL if seg is buffered */
RingStruct genRing; /* link in list of segs in gen */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} GCSegStruct;
@ -258,7 +258,7 @@ typedef struct GCSegStruct { /* GC segment structure */
*
* .locus-pref: arena memory users (pool class code) need a way of
* expressing preferences about the locus of the segments they
* allocate. See <design/locus/>.
* allocate. <design/locus>.
*/
#define LocusPrefSig ((Sig)0x51970CB6) /* SIGnature LOCus PRef */
@ -273,7 +273,7 @@ typedef struct LocusPrefStruct { /* locus placement preferences */
/* BufferClassStruct -- buffer class structure
*
* See <design/buffer/> & <design/protocol/>.
* <design/buffer> & <design/protocol>.
*
* .buffer.class: The buffer class structure is defined by each buffer
* class implementation in order to provide a generic interface to
@ -298,10 +298,10 @@ typedef struct BufferClassStruct {
/* BufferStruct -- allocation buffer structure
*
* See <code/buffer.c>, <design/buffer/>.
* See <code/buffer.c>, <design/buffer>.
*
* The buffer contains an AP which may be exported to the client.
* AP are part of the design of buffers see <design/buffer/>.
* AP are part of the design of buffers see <design/buffer>.
* The allocation point is exported to the client code so that it can
* do in-line buffered allocation.
*/
@ -310,7 +310,7 @@ typedef struct BufferClassStruct {
typedef struct BufferStruct {
InstStruct instStruct;
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
Serial serial; /* from pool->bufferSerial */
Arena arena; /* owning arena */
Pool pool; /* owning pool */
@ -339,13 +339,13 @@ typedef struct SegBufStruct {
BufferStruct bufferStruct; /* superclass fields must come first */
RankSet rankSet; /* ranks of references being created */
Seg seg; /* segment being buffered */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} SegBufStruct;
/* FormatStruct -- object format structure
*
* See design.mps.format-interface, <code/format.c>.
* <design/format-interface>, <code/format.c>.
*
* .single: In future, when more variants are added, FormatStruct should
* really be replaced by a collection of format classes. */
@ -399,14 +399,14 @@ typedef struct mps_fmt_s {
#define ScanStateSig ((Sig)0x5195CA45) /* SIGnature SCAN State */
typedef struct ScanStateStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
struct mps_ss_s ss_s; /* .ss <http://bash.org/?400459> */
Arena arena; /* owning arena */
SegFixMethod fix; /* third stage fix function */
void *fixClosure; /* see .ss.fix-closure */
TraceSet traces; /* traces to scan for */
Rank rank; /* reference rank of scanning */
Bool wasMarked; /* design.mps.fix.protocol.was-ready */
Bool wasMarked; /* <design/fix#.protocol.was-ready> */
RefSet fixedSummary; /* accumulated summary of fixed references */
STATISTIC_DECL(Count fixRefCount) /* refs which pass zone check */
STATISTIC_DECL(Count segRefCount) /* refs which refer to segs */
@ -425,7 +425,7 @@ typedef struct ScanStateStruct {
#define TraceSig ((Sig)0x51924ACE) /* SIGnature TRACE */
typedef struct TraceStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
TraceId ti; /* index into TraceSets */
Arena arena; /* owning arena */
TraceStartWhy why; /* why the trace began */
@ -505,12 +505,12 @@ typedef struct mps_arena_class_s {
typedef struct GlobalsStruct {
Sig sig;
/* general fields (<code/global.c>) */
/* general fields <code/global.c> */
RingStruct globalRing; /* node in global ring of arenas */
Lock lock; /* arena's lock */
/* polling fields (<code/global.c>) */
double pollThreshold; /* <design/arena/#poll> */
/* polling fields <code/global.c> */
double pollThreshold; /* <design/arena#.poll> */
Bool insidePoll;
Bool clamped; /* prevent background activity */
double fillMutatorSize; /* total bytes filled, mutator buffers */
@ -519,35 +519,35 @@ typedef struct GlobalsStruct {
double fillInternalSize; /* total bytes filled, internal buffers */
double emptyInternalSize; /* total bytes emptied, internal buffers */
/* version field (<code/version.c>) */
/* version field <code/version.c> */
const char *mpsVersionString; /* MPSVersion() */
/* buffer fields (<code/buffer.c>) */
Bool bufferLogging; /* <design/buffer/#logging.control> */
/* buffer fields <code/buffer.c> */
Bool bufferLogging; /* <design/buffer#.logging.control> */
/* pool fields (<code/pool.c>) */
/* pool fields <code/pool.c> */
RingStruct poolRing; /* ring of pools in arena */
Serial poolSerial; /* serial of next created pool */
Count systemPools; /* count of pools remaining at ArenaDestroy */
/* root fields (<code/root.c>) */
/* root fields <code/root.c> */
RingStruct rootRing; /* ring of roots attached to arena */
Serial rootSerial; /* serial of next root */
/* remember summary (<code/trace.c>) */
/* remember summary <code/trace.c> */
RingStruct rememberedSummaryRing;
/* index into next free slot in block. 0 means that a new
block should be allocated and appended. */
Index rememberedSummaryIndex;
/* locus (<code/locus.c>) */
/* locus <code/locus.c> */
Chain defaultChain; /* default chain for GC pool */
} GlobalsStruct;
/* LandClassStruct -- land class structure
*
* See <design/land/>.
* <design/land>.
*/
#define LandClassSig ((Sig)0x5197A4DC) /* SIGnature LAND Class */
@ -573,14 +573,14 @@ typedef struct LandClassStruct {
/* LandStruct -- generic land structure
*
* See <design/land/>, <code/land.c>
* <design/land>, <code/land.c>
*/
#define LandSig ((Sig)0x5197A4D9) /* SIGnature LAND */
typedef struct LandStruct {
InstStruct instStruct;
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
Arena arena; /* owning arena */
Align alignment; /* alignment of addresses */
Bool inLand; /* prevent reentrance */
@ -654,7 +654,7 @@ typedef struct FreelistStruct {
*
* See QuickSort in mpm.c. This exists so that the caller can make
* the choice about where to allocate the memory, since the MPS has to
* operate in tight stack constraints -- see design.mps.sp.
* operate in tight stack constraints -- see <design/sp>.
*/
typedef struct SortStruct {
@ -666,14 +666,14 @@ typedef struct SortStruct {
/* ShieldStruct -- per-arena part of the shield
*
* See design.mps.shield, impl.c.shield.
* <design/shield>, <code/shield.c>.
*/
#define ShieldSig ((Sig)0x519581E1) /* SIGnature SHEILd */
typedef struct ShieldStruct {
Sig sig; /* design.mps.sig */
BOOLFIELD(inside); /* design.mps.shield.def.inside */
Sig sig; /* <design/sig> */
BOOLFIELD(inside); /* <design/shield#.def.inside> */
BOOLFIELD(suspended); /* mutator suspended? */
BOOLFIELD(queuePending); /* queue insertion pending? */
Seg *queue; /* queue of unsynced segs */
@ -689,23 +689,23 @@ typedef struct ShieldStruct {
/* History -- location dependency history
*
* See design.mps.arena.ld.
* <design/arena#.ld>.
*/
#define HistorySig ((Sig)0x51981520) /* SIGnature HISTOry */
typedef struct HistoryStruct {
Sig sig; /* design.mps.sig */
Epoch epoch; /* <design/arena/#ld.epoch> */
RefSet prehistory; /* <design/arena/#ld.prehistory> */
RefSet history[LDHistoryLENGTH]; /* <design/arena/#ld.history> */
Sig sig; /* <design/sig> */
Epoch epoch; /* <design/arena#.ld.epoch> */
RefSet prehistory; /* <design/arena#.ld.prehistory> */
RefSet history[LDHistoryLENGTH]; /* <design/arena#.ld.history> */
} HistoryStruct;
/* MVFFStruct -- MVFF (Manual Variable First Fit) pool outer structure
*
* The signature is placed at the end, see
* <design/pool/#outer-structure.sig>
* <design/pool#.outer-structure.sig>
*
* The MVFF pool outer structure is declared here because it is the
* control pool structure which is inlined in the arena. Normally,
@ -727,7 +727,7 @@ typedef struct MVFFStruct { /* MVFF pool outer structure */
FailoverStruct foStruct; /* free memory (fail-over mechanism) */
Bool firstFit; /* as opposed to last fit */
Bool slotHigh; /* prefers high part of large block */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} MVFFStruct;
@ -741,11 +741,11 @@ typedef struct MVFFStruct { /* MVFF pool outer structure */
typedef struct mps_arena_s {
InstStruct instStruct;
GlobalsStruct globals; /* must be first, see <design/arena/#globals> */
GlobalsStruct globals; /* must be first, see <design/arena#.globals> */
Serial serial;
Bool poolReady; /* <design/arena/#pool.ready> */
MVFFStruct controlPoolStruct; /* <design/arena/#pool> */
Bool poolReady; /* <design/arena#.pool.ready> */
MVFFStruct controlPoolStruct; /* <design/arena#.pool> */
Size reserved; /* total reserved address space */
Size committed; /* total committed memory */
@ -756,7 +756,7 @@ typedef struct mps_arena_s {
double pauseTime; /* maximum pause time, in seconds */
Shift zoneShift; /* see also <code/ref.c> */
Size grainSize; /* <design/arena/#grain> */
Size grainSize; /* <design/arena#.grain> */
Tract lastTract; /* most recently allocated tract */
Addr lastTractBase; /* base address of lastTract */
@ -772,39 +772,39 @@ typedef struct mps_arena_s {
ZoneSet freeZones; /* zones not yet allocated */
Bool zoned; /* use zoned allocation? */
/* locus fields (<code/locus.c>) */
/* locus fields <code/locus.c> */
GenDescStruct topGen; /* generation descriptor for dynamic gen */
Serial genSerial; /* serial of next generation */
/* format fields (<code/format.c>) */
/* format fields <code/format.c> */
RingStruct formatRing; /* ring of formats attached to arena */
Serial formatSerial; /* serial of next format */
/* message fields (<design/message/>, <code/message.c>) */
/* message fields <design/message>, <code/message.c> */
RingStruct messageRing; /* ring of pending messages */
BT enabledMessageTypes; /* map of which types are enabled */
Count droppedMessages; /* <design/message-gc/#lifecycle> */
Count droppedMessages; /* <design/message-gc#.lifecycle> */
/* finalization fields (<design/finalize/>), <code/poolmrg.c> */
/* finalization fields <design/finalize>, <code/poolmrg.c> */
Bool isFinalPool; /* indicator for finalPool */
Pool finalPool; /* either NULL or an MRG pool */
/* thread fields (<code/thread.c>) */
/* thread fields <code/thread.c> */
RingStruct threadRing; /* ring of attached threads */
RingStruct deadRing; /* ring of dead threads */
Serial threadSerial; /* serial of next thread */
ShieldStruct shieldStruct;
/* trace fields (<code/trace.c>) */
/* trace fields <code/trace.c> */
TraceSet busyTraces; /* set of running traces */
TraceSet flippedTraces; /* set of running and flipped traces */
TraceStruct trace[TraceLIMIT]; /* trace structures. See
<design/trace/#intance.limit> */
<design/trace#.intance.limit> */
/* trace ancillary fields (<code/traceanc.c>) */
TraceStartMessage tsMessage[TraceLIMIT]; /* <design/message-gc/> */
TraceMessage tMessage[TraceLIMIT]; /* <design/message-gc/> */
/* trace ancillary fields <code/traceanc.c> */
TraceStartMessage tsMessage[TraceLIMIT]; /* <design/message-gc> */
TraceMessage tMessage[TraceLIMIT]; /* <design/message-gc> */
/* policy fields */
double tracedWork;
@ -818,7 +818,7 @@ typedef struct mps_arena_s {
Bool emergency; /* garbage collect in emergency mode? */
/* Stack scanning -- see design.mps.stack-scan */
/* Stack scanning -- see <design/stack-scan> */
void *stackWarm; /* NULL or stack pointer warmer than
mutator state. */

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
* Portions copyright (c) 2001 Global Graphics Software.
*
* .design: <design/type/>
* .design: <design/type>
*
* .rationale: Types and type constants are almost all defined
* in this header, in advance of any declarations of prototypes
@ -26,88 +26,88 @@
/* TYPES */
typedef unsigned long Sig; /* <design/sig/> */
typedef int Res; /* <design/type/#res> */
typedef unsigned long Sig; /* <design/sig> */
typedef int Res; /* <design/type#.res> */
typedef void (*Fun)(void); /* <design/type/#fun> */
typedef MPS_T_WORD Word; /* <design/type/#word> */
typedef unsigned char Byte; /* <design/type/#byte> */
typedef struct AddrStruct *Addr; /* <design/type/#addr> */
typedef const struct AddrStruct *ReadonlyAddr; /* <design/type/#readonlyaddr> */
typedef Word Size; /* <design/type/#size> */
typedef Word Count; /* <design/type/#count> */
typedef Word Index; /* <design/type/#index> */
typedef Word Align; /* <design/type/#align> */
typedef Word Work; /* <design/type/#work> */
typedef unsigned Shift; /* <design/type/#shift> */
typedef unsigned Serial; /* <design/type/#serial> */
typedef Addr Ref; /* <design/type/#ref> */
typedef void *Pointer; /* <design/type/#pointer> */
typedef Word Clock; /* <design/type/#clock> */
typedef MPS_T_ULONGEST ULongest; /* <design/type/#ulongest> */
typedef void (*Fun)(void); /* <design/type#.fun> */
typedef MPS_T_WORD Word; /* <design/type#.word> */
typedef unsigned char Byte; /* <design/type#.byte> */
typedef struct AddrStruct *Addr; /* <design/type#.addr> */
typedef const struct AddrStruct *ReadonlyAddr; /* <design/type#.readonlyaddr> */
typedef Word Size; /* <design/type#.size> */
typedef Word Count; /* <design/type#.count> */
typedef Word Index; /* <design/type#.index> */
typedef Word Align; /* <design/type#.align> */
typedef Word Work; /* <design/type#.work> */
typedef unsigned Shift; /* <design/type#.shift> */
typedef unsigned Serial; /* <design/type#.serial> */
typedef Addr Ref; /* <design/type#.ref> */
typedef void *Pointer; /* <design/type#.pointer> */
typedef Word Clock; /* <design/type#.clock> */
typedef MPS_T_ULONGEST ULongest; /* <design/type#.ulongest> */
typedef mps_arg_s ArgStruct;
typedef mps_arg_s *Arg;
typedef mps_arg_s *ArgList;
typedef mps_key_t Key;
typedef Word RefSet; /* <design/collection/#refsets> */
typedef Word ZoneSet; /* <design/collection/#refsets> */
typedef unsigned Rank; /* <design/type/#rank> */
typedef unsigned RankSet; /* <design/type/#rankset> */
typedef unsigned RootMode; /* <design/type/#rootmode> */
typedef Size Epoch; /* <design/type/#epoch> */
typedef unsigned TraceId; /* <design/type/#traceid> */
typedef unsigned TraceSet; /* <design/type/#traceset> */
typedef unsigned TraceState; /* <design/type/#tracestate> */
typedef unsigned TraceStartWhy; /* <design/type/#tracestartwhy> */
typedef unsigned AccessSet; /* <design/type/#access-set> */
typedef unsigned Attr; /* <design/type/#attr> */
typedef unsigned RootVar; /* <design/type/#rootvar> */
typedef Word RefSet; /* <design/collection#.refsets> */
typedef Word ZoneSet; /* <design/collection#.refsets> */
typedef unsigned Rank; /* <design/type#.rank> */
typedef unsigned RankSet; /* <design/type#.rankset> */
typedef unsigned RootMode; /* <design/type#.rootmode> */
typedef Size Epoch; /* <design/type#.epoch> */
typedef unsigned TraceId; /* <design/type#.traceid> */
typedef unsigned TraceSet; /* <design/type#.traceset> */
typedef unsigned TraceState; /* <design/type#.tracestate> */
typedef unsigned TraceStartWhy; /* <design/type#.tracestartwhy> */
typedef unsigned AccessSet; /* <design/type#.access-set> */
typedef unsigned Attr; /* <design/type#.attr> */
typedef unsigned RootVar; /* <design/type#.rootvar> */
typedef Word *BT; /* <design/bt/> */
typedef Word *BT; /* <design/bt> */
typedef struct BootBlockStruct *BootBlock; /* <code/boot.c> */
typedef struct BufferStruct *Buffer; /* <design/buffer/> */
typedef struct SegBufStruct *SegBuf; /* <design/buffer/> */
typedef struct BufferClassStruct *BufferClass; /* <design/buffer/> */
typedef unsigned BufferMode; /* <design/buffer/> */
typedef struct mps_fmt_s *Format; /* design.mps.format */
typedef struct BufferStruct *Buffer; /* <design/buffer> */
typedef struct SegBufStruct *SegBuf; /* <design/buffer> */
typedef struct BufferClassStruct *BufferClass; /* <design/buffer> */
typedef unsigned BufferMode; /* <design/buffer> */
typedef struct mps_fmt_s *Format; /* <design/format> */
typedef struct LockStruct *Lock; /* <code/lock.c>* */
typedef struct mps_pool_s *Pool; /* <design/pool/> */
typedef struct mps_pool_s *Pool; /* <design/pool> */
typedef Pool AbstractPool;
typedef struct mps_pool_class_s *PoolClass; /* <code/poolclas.c> */
typedef struct TraceStruct *Trace; /* <design/trace/> */
typedef struct ScanStateStruct *ScanState; /* <design/trace/> */
typedef struct mps_chain_s *Chain; /* <design/trace/> */
typedef struct TractStruct *Tract; /* <design/arena/> */
typedef struct TraceStruct *Trace; /* <design/trace> */
typedef struct ScanStateStruct *ScanState; /* <design/trace> */
typedef struct mps_chain_s *Chain; /* <design/trace> */
typedef struct TractStruct *Tract; /* <design/arena> */
typedef struct ChunkStruct *Chunk; /* <code/tract.c> */
typedef struct ChunkCacheEntryStruct *ChunkCacheEntry; /* <code/tract.c> */
typedef union PageUnion *Page; /* <code/tract.c> */
typedef struct SegStruct *Seg; /* <code/seg.c> */
typedef struct GCSegStruct *GCSeg; /* <code/seg.c> */
typedef struct SegClassStruct *SegClass; /* <code/seg.c> */
typedef struct LocusPrefStruct *LocusPref; /* <design/locus/>, <code/locus.c> */
typedef unsigned LocusPrefKind; /* <design/locus/>, <code/locus.c> */
typedef struct mps_arena_class_s *ArenaClass; /* <design/arena/> */
typedef struct mps_arena_s *Arena; /* <design/arena/> */
typedef struct LocusPrefStruct *LocusPref; /* <design/locus>, <code/locus.c> */
typedef unsigned LocusPrefKind; /* <design/locus>, <code/locus.c> */
typedef struct mps_arena_class_s *ArenaClass; /* <design/arena> */
typedef struct mps_arena_s *Arena; /* <design/arena> */
typedef Arena AbstractArena;
typedef struct GlobalsStruct *Globals; /* <design/arena/> */
typedef struct GlobalsStruct *Globals; /* <design/arena> */
typedef struct VMStruct *VM; /* <code/vm.c>* */
typedef struct RootStruct *Root; /* <code/root.c> */
typedef struct mps_thr_s *Thread; /* <code/th.c>* */
typedef struct MutatorContextStruct *MutatorContext; /* <design/prmc/> */
typedef struct MutatorContextStruct *MutatorContext; /* <design/prmc> */
typedef struct PoolDebugMixinStruct *PoolDebugMixin;
typedef struct AllocPatternStruct *AllocPattern;
typedef struct AllocFrameStruct *AllocFrame; /* <design/alloc-frame/> */
typedef struct AllocFrameStruct *AllocFrame; /* <design/alloc-frame> */
typedef struct StackContextStruct *StackContext;
typedef struct RangeStruct *Range; /* <design/range/> */
typedef struct RangeStruct *Range; /* <design/range> */
typedef struct RangeTreeStruct *RangeTree;
typedef struct LandStruct *Land; /* <design/land/> */
typedef struct LandClassStruct *LandClass; /* <design/land/> */
typedef unsigned FindDelete; /* <design/land/> */
typedef struct ShieldStruct *Shield; /* design.mps.shield */
typedef struct HistoryStruct *History; /* design.mps.arena.ld */
typedef struct PoolGenStruct *PoolGen; /* <design/strategy/> */
typedef struct LandStruct *Land; /* <design/land> */
typedef struct LandClassStruct *LandClass; /* <design/land> */
typedef unsigned FindDelete; /* <design/land> */
typedef struct ShieldStruct *Shield; /* <design/shield> */
typedef struct HistoryStruct *History; /* <design/arena#.ld> */
typedef struct PoolGenStruct *PoolGen; /* <design/strategy> */
/* Arena*Method -- see <code/mpmst.h#ArenaClassStruct> */
@ -150,7 +150,7 @@ typedef void (*FormattedObjectsVisitor)(Addr obj, Format fmt, Pool pool,
typedef void (*FreeBlockVisitor)(Addr base, Addr limit, Pool pool, void *p);
/* Seg*Method -- see <design/seg/> */
/* Seg*Method -- see <design/seg> */
typedef Res (*SegInitMethod)(Seg seg, Pool pool, Addr base, Size size,
ArgList args);
@ -183,7 +183,7 @@ typedef void (*SegWalkMethod)(Seg seg, Format format, FormattedObjectsVisitor f,
void *v, size_t s);
/* Buffer*Method -- see <design/buffer/> */
/* Buffer*Method -- see <design/buffer> */
typedef void (*BufferVarargsMethod)(ArgStruct args[], va_list varargs);
typedef Res (*BufferInitMethod)(Buffer buffer, Pool pool, Bool isMutator, ArgList args);
@ -196,7 +196,7 @@ typedef void (*BufferSetRankSetMethod)(Buffer buffer, RankSet rankSet);
typedef void (*BufferReassignSegMethod)(Buffer buffer, Seg seg);
/* Pool*Method -- see <design/pool/> */
/* Pool*Method -- see <design/pool> */
/* Order of types corresponds to PoolClassStruct in <code/mpmst.h> */
@ -222,14 +222,14 @@ typedef Size (*PoolSizeMethod)(Pool pool);
/* Messages
*
* See <design/message/>
* <design/message>
*/
typedef unsigned MessageType;
typedef struct mps_message_s *Message;
typedef struct MessageClassStruct *MessageClass;
/* Message*Method -- <design/message/> */
/* Message*Method -- <design/message> */
typedef void (*MessageDeleteMethod)(Message message);
typedef void (*MessageFinalizationRefMethod)
@ -239,13 +239,13 @@ typedef Size (*MessageGCCondemnedSizeMethod)(Message message);
typedef Size (*MessageGCNotCondemnedSizeMethod)(Message message);
typedef const char * (*MessageGCStartWhyMethod)(Message message);
/* Message Types -- <design/message/> and elsewhere */
/* Message Types -- <design/message> and elsewhere */
typedef struct TraceStartMessageStruct *TraceStartMessage;
typedef struct TraceMessageStruct *TraceMessage; /* trace end */
/* Land*Method -- see <design/land/> */
/* Land*Method -- see <design/land> */
typedef Res (*LandInitMethod)(Land land, Arena arena, Align alignment, ArgList args);
typedef Size (*LandSizeMethod)(Land land);
@ -262,11 +262,11 @@ typedef Res (*LandFindInZonesMethod)(Bool *foundReturn, Range rangeReturn, Range
/* CONSTANTS */
/* <design/sig/> */
/* <design/sig> */
#define SigInvalid ((Sig)0x51915BAD) /* SIGnature IS BAD */
#define SizeMAX ((Size)-1)
#define AccessSetEMPTY ((AccessSet)0) /* <design/type/#access-set> */
#define AccessSetEMPTY ((AccessSet)0) /* <design/type#.access-set> */
#define AccessREAD ((AccessSet)(1<<0))
#define AccessWRITE ((AccessSet)(1<<1))
#define AccessLIMIT (2)
@ -300,7 +300,7 @@ enum {
#define BufferModeTRANSITION ((BufferMode)(1<<3))
/* Rank constants -- see <design/type/#rank> */
/* Rank constants -- see <design/type#.rank> */
/* These definitions must match <code/mps.h#rank>. */
/* This is checked by <code/mpsi.c#check>. */
@ -325,7 +325,7 @@ enum {
#define RootModePROTECTABLE_INNER ((RootMode)1<<2)
/* Root Variants -- see <design/type/#rootvar>
/* Root Variants -- see <design/type#.rootvar>
*
* .rootvar: Synchonize with <code/root.c#rootvarcheck>
*/
@ -341,12 +341,12 @@ enum {
};
/* .result-codes: Result Codes -- see <design/type/#res> */
/* .result-codes: Result Codes -- see <design/type#.res> */
_mps_ENUM_DEF(_mps_RES_ENUM, Res)
/* TraceStates -- see <design/trace/> */
/* TraceStates -- see <design/trace> */
enum {
TraceINIT = 1,
@ -389,7 +389,7 @@ enum {
};
/* MessageTypes -- see <design/message/> */
/* MessageTypes -- see <design/message> */
/* .message.types: Keep in sync with <code/mps.h#message.types> */
enum {
@ -400,7 +400,7 @@ enum {
};
/* FindDelete operations -- see <design/land/> */
/* FindDelete operations -- see <design/land> */
enum {
FindDeleteNONE = 1, /* don't delete after finding */

View file

@ -99,8 +99,8 @@ typedef mps_word_t mps_label_t; /* telemetry label */
_mps_ENUM_DEF(_mps_RES_ENUM, MPS_RES_)
/* Format and Root Method Types */
/* see design.mps.root-interface */
/* see design.mps.format-interface */
/* see <design/root-interface> */
/* see <design/format-interface> */
typedef struct mps_scan_tag_s *mps_scan_tag_t;
typedef struct mps_scan_tag_s {

View file

@ -8,9 +8,9 @@
* <code/mps.h>, and the internal MPM interfaces, as defined by
* <code/mpm.h>. .purpose.check: It performs checking of the C client's
* usage of the MPS Interface. .purpose.thread: It excludes multiple
* threads from the MPM by locking the Arena (see <design/thread-safety/>).
* threads from the MPM by locking the Arena (see <design/thread-safety>).
*
* .design: <design/interface-c/>
* .design: <design/interface-c>
*
*
* NOTES
@ -22,7 +22,7 @@
* .note.avert: Use AVERT only when "inside" the Arena (between
* ArenaEnter and ArenaLeave), as it's not thread-safe in all
* varieties. Use AVER(TESTT) otherwise. See
* <design/sig/#check.arg.unlocked>.
* <design/sig#.check.arg.unlocked>.
*
*
* TRANSGRESSIONS (rule.impl.trans)
@ -41,7 +41,7 @@
* In future, it will.
*
* .naming: (rule.impl.guide) The exported identifiers do not follow the
* normal MPS naming conventions. See <design/interface-c/#naming>.
* normal MPS naming conventions. <design/interface-c#.naming>.
*/
#include "mpm.h"
@ -84,7 +84,7 @@ static Bool mpsi_check(void)
== (int)_mps_MESSAGE_TYPE_GC_START);
/* The external idea of a word width and the internal one */
/* had better match. See <design/interface-c/#cons>. */
/* had better match. <design/interface-c#.cons>. */
CHECKL(sizeof(mps_word_t) == sizeof(void *));
CHECKL(COMPATTYPE(mps_word_t, Word));
@ -93,8 +93,8 @@ static Bool mpsi_check(void)
CHECKL(COMPATTYPE(mps_addr_t, Addr));
/* The external idea of size and the internal one had */
/* better match. See <design/interface-c/#cons.size> */
/* and <design/interface-c/#pun.size>. */
/* better match. <design/interface-c#.cons.size> */
/* and <design/interface-c#.pun.size>. */
CHECKL(COMPATTYPE(size_t, Size));
/* Clock values are passed from external to internal and back */
@ -542,7 +542,7 @@ mps_res_t mps_fmt_create_k(mps_fmt_t *mps_fmt_o,
*
* .fmt.create.A.purpose: This function converts an object format spec
* of variant "A" into an MPM Format object. See
* <design/interface-c/#fmt.extend> for justification of the way that
* <design/interface-c#.fmt.extend> for justification of the way that
* the format structure is declared as "mps_fmt_A". */
mps_res_t mps_fmt_create_A(mps_fmt_t *mps_fmt_o,
@ -807,7 +807,7 @@ mps_res_t mps_alloc(mps_addr_t *p_o, mps_pool_t pool, size_t size)
AVERT_CRITICAL(Pool, pool);
AVER_CRITICAL(size > 0);
/* Note: class may allow unaligned size, see */
/* <design/pool/#method.alloc.size.align>. */
/* <design/pool#.method.alloc.size.align>. */
/* Rest ignored, see .varargs. */
res = PoolAlloc(&p, pool, size);
@ -847,7 +847,7 @@ void mps_free(mps_pool_t pool, mps_addr_t p, size_t size)
AVERT_CRITICAL(Pool, pool);
AVER_CRITICAL(size > 0);
/* Note: class may allow unaligned size, see */
/* <design/pool/#method.free.size.align>. */
/* <design/pool#.method.free.size.align>. */
PoolFree(pool, (Addr)p, size);
ArenaLeave(arena);
@ -998,7 +998,7 @@ mps_bool_t (mps_commit)(mps_ap_t mps_ap, mps_addr_t p, size_t size)
/* mps_ap_frame_push -- push a new allocation frame
*
* See <design/alloc-frame/#lw-frame.push>. */
* <design/alloc-frame#.lw-frame.push>. */
mps_res_t (mps_ap_frame_push)(mps_frame_t *frame_o, mps_ap_t mps_ap)
{
@ -1039,7 +1039,7 @@ mps_res_t (mps_ap_frame_push)(mps_frame_t *frame_o, mps_ap_t mps_ap)
/* mps_ap_frame_pop -- push a new allocation frame
*
* See <design/alloc-frame/#lw-frame.pop>. */
* <design/alloc-frame#.lw-frame.pop>. */
mps_res_t (mps_ap_frame_pop)(mps_ap_t mps_ap, mps_frame_t frame)
{
@ -1686,7 +1686,7 @@ void mps_ld_reset(mps_ld_t ld, mps_arena_t arena)
/* mps_ld_add -- add a reference to a location dependency
*
* See <design/interface-c/#lock-free>. */
* <design/interface-c#.lock-free>. */
void mps_ld_add(mps_ld_t ld, mps_arena_t arena, mps_addr_t addr)
{
@ -1696,7 +1696,7 @@ void mps_ld_add(mps_ld_t ld, mps_arena_t arena, mps_addr_t addr)
/* mps_ld_merge -- merge two location dependencies
*
* See <design/interface-c/#lock-free>. */
* <design/interface-c#.lock-free>. */
void mps_ld_merge(mps_ld_t ld, mps_arena_t arena,
mps_ld_t from)
@ -1707,7 +1707,7 @@ void mps_ld_merge(mps_ld_t ld, mps_arena_t arena,
/* mps_ld_isstale -- check whether a location dependency is "stale"
*
* See <design/interface-c/#lock-free>. */
* <design/interface-c#.lock-free>. */
mps_bool_t mps_ld_isstale(mps_ld_t ld, mps_arena_t arena,
mps_addr_t addr)

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
*
* .readership: For MPS client application developers, MPS developers.
* .sources: <design/io/>
* .sources: <design/io>
*/
#ifndef mpsio_h

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .readership: For MPS client application developers and MPS developers.
* .sources: <design/io/>
* .sources: <design/io>
*/
#include "mpsio.h"

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001-2017 Ravenbrook Limited. See end of file for license.
*
* .readership: MPS client application developers, MPS developers.
* .sources: <design/lib/>
* .sources: <design/lib>
*
* .purpose: The purpose of this file is to declare the functions and types
* required for the MPS library interface.

View file

@ -11,7 +11,7 @@
* Interface.
*
* .readership: For MPS client application developers and MPS developers.
* .sources: <design/lib/>
* .sources: <design/lib>
*
*
* TRANSGRESSIONS (rule.impl.trans)

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2014 Ravenbrook Limited. See end of file for license.
*
* .sources: <design/nailboard/>.
* .sources: <design/nailboard>.
*/
#include "bt.h"
@ -14,14 +14,14 @@
SRCID(nailboard, "$Id$");
/* Log2 of scale factor between levels. See <design/nailboard/#impl.scale>. */
/* Log2 of scale factor between levels. <design/nailboard#.impl.scale>. */
#define LEVEL_SHIFT MPS_WORD_SHIFT
/* nailboardLevels -- return the number of levels in a nailboard with
* the given number of nails.
*
* See <design/nailboard/#impl.table.last>
* <design/nailboard#.impl.table.last>
*/
static Count nailboardLevels(Count nails)
@ -331,7 +331,7 @@ Bool NailboardIsSetRange(Nailboard board, Addr base, Addr limit)
* object in every nailed segment. It must take time that is no more
* than logarithmic in the size of the range.
*
* See <design/nailboard/#impl.isresrange>.
* <design/nailboard#.impl.isresrange>.
*/
Bool NailboardIsResRange(Nailboard board, Addr base, Addr limit)
@ -350,11 +350,11 @@ Bool NailboardIsResRange(Nailboard board, Addr base, Addr limit)
nailboardIndexRange(&ibase, &ilimit, board, i, base, limit);
if (BTIsResRange(board->level[i], ibase, ilimit))
/* The entire range was clear. This is expected to be the common
* case. <design/nailboard/#impl.isresrange.empty> */
* case. <design/nailboard#.impl.isresrange.empty> */
return TRUE;
if (i == 0)
/* At level 0 there is only one nail per bit so the set bit is known
* to be within the range. <design/nailboard/#impl.isresrange.level0> */
* to be within the range. <design/nailboard#.impl.isresrange.level0> */
return FALSE;
} while (ibase + 1 >= ilimit - 1);
@ -377,7 +377,7 @@ Bool NailboardIsResRange(Nailboard board, Addr base, Addr limit)
-- j;
nailboardIndexRange(&jbase, &jlimit, board, j, base, leftLimit);
if (jbase + 1 < jlimit && !BTIsResRange(board->level[j], jbase + 1, jlimit))
return FALSE; /* <design/nailboard/#impl.isresrange.inner> */
return FALSE; /* <design/nailboard#.impl.isresrange.inner> */
if (!BTGet(board->level[j], jbase))
break;
if (j == 0)
@ -392,7 +392,7 @@ Bool NailboardIsResRange(Nailboard board, Addr base, Addr limit)
-- j;
nailboardIndexRange(&jbase, &jlimit, board, j, rightBase, limit);
if (jbase < jlimit - 1 && !BTIsResRange(board->level[j], jbase, jlimit - 1))
return FALSE; /* <design/nailboard/#impl.isresrange.inner> */
return FALSE; /* <design/nailboard#.impl.isresrange.inner> */
if (!BTGet(board->level[j], jlimit - 1))
break;
if (j == 0)

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2014 Ravenbrook Limited. See end of file for license.
*
* .source: <design/nailboard/>.
* .source: <design/nailboard>.
*/
#ifndef nailboard_h

View file

@ -6,7 +6,7 @@
* This module collects the decision-making code for the MPS, so that
* policy can be maintained and adjusted.
*
* .sources: <design/strategy/>.
* .sources: <design/strategy>.
*/
#include "locus.h"
@ -205,7 +205,7 @@ Bool PolicyShouldCollectWorld(Arena arena, double availableTime,
*
* This is only called if ChainDeferral returned a value sufficiently
* low that we decided to start the collection. (Usually such values
* are less than zero; see <design/strategy/#policy.start.chain>.)
* are less than zero; see <design/strategy#.policy.start.chain>.)
*/
static Res policyCondemnChain(double *mortalityReturn, Chain chain, Trace trace)

View file

@ -6,7 +6,7 @@
*
* DESIGN
*
* .design: See <design/pool/>.
* .design: <design/pool>.
*
* PURPOSE
*
@ -118,7 +118,7 @@ ARG_DEFINE_KEY(INTERIOR, Bool);
/* PoolInit -- initialize a pool
*
* Initialize the generic fields of the pool and calls class-specific
* init. See <design/pool/#align>.
* init. <design/pool#.align>.
*/
Res PoolInit(Pool pool, Arena arena, PoolClass klass, ArgList args)

View file

@ -105,7 +105,7 @@ Res PoolAbsInit(Pool pool, Arena arena, PoolClass klass, ArgList args)
pool->serial = ArenaGlobals(arena)->poolSerial;
++ArenaGlobals(arena)->poolSerial;
/* Initialise signature last; see <design/sig/> */
/* Initialise signature last; see <design/sig> */
SetClassOfPoly(pool, CLASS(AbstractPool));
pool->sig = PoolSig;
AVERT(Pool, pool);
@ -202,7 +202,7 @@ DEFINE_CLASS(Pool, AbstractCollectPool, klass)
/* PoolNo*, PoolTriv* -- Trivial and non-methods for Pool Classes
*
* See <design/pool/#no> and <design/pool/#triv>
* <design/pool#.no> and <design/pool#.triv>
*/
Res PoolNoAlloc(Addr *pReturn, Pool pool, Size size)

View file

@ -4,7 +4,7 @@
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*
* .sources: <design/poolamc/>.
* .sources: <design/poolamc>.
*/
#include "mpscamc.h"
@ -127,9 +127,9 @@ static Bool amcSegCheck(amcSeg amcseg)
CHECKD(Nailboard, amcseg->board);
CHECKL(SegNailed(MustBeA(Seg, amcseg)) != TraceSetEMPTY);
}
/* CHECKL(BoolCheck(amcseg->accountedAsBuffered)); <design/type/#bool.bitfield.check> */
/* CHECKL(BoolCheck(amcseg->old)); <design/type/#bool.bitfield.check> */
/* CHECKL(BoolCheck(amcseg->deferred)); <design/type/#bool.bitfield.check> */
/* CHECKL(BoolCheck(amcseg->accountedAsBuffered)); <design/type#.bool.bitfield.check> */
/* CHECKL(BoolCheck(amcseg->old)); <design/type#.bool.bitfield.check> */
/* CHECKL(BoolCheck(amcseg->deferred)); <design/type#.bool.bitfield.check> */
return TRUE;
}
@ -253,7 +253,7 @@ static void AMCSegSketch(Seg seg, char *pbSketch, size_t cbSketch)
/* AMCSegDescribe -- describe the contents of a segment
*
* See <design/poolamc/#seg-describe>.
* <design/poolamc#.seg-describe>.
*/
static Res AMCSegDescribe(Inst inst, mps_lib_FILE *stream, Count depth)
{
@ -372,7 +372,7 @@ DEFINE_CLASS(Seg, amcSeg, klass)
/* amcSegHasNailboard -- test whether the segment has a nailboard
*
* See <design/poolamc/#fix.nail.distinguish>.
* <design/poolamc#.fix.nail.distinguish>.
*/
static Bool amcSegHasNailboard(Seg seg)
{
@ -402,12 +402,12 @@ static amcGen amcSegGen(Seg seg)
/* AMCStruct -- pool AMC descriptor
*
* See <design/poolamc/#struct>.
* <design/poolamc#.struct>.
*/
#define AMCSig ((Sig)0x519A3C99) /* SIGnature AMC */
typedef struct AMCStruct { /* <design/poolamc/#struct> */
typedef struct AMCStruct { /* <design/poolamc#.struct> */
PoolStruct poolStruct; /* generic pool structure */
RankSet rankSet; /* rankSet for entire pool */
RingStruct genRing; /* ring of generations */
@ -417,12 +417,12 @@ typedef struct AMCStruct { /* <design/poolamc/#struct> */
amcGen nursery; /* the default mutator generation */
amcGen rampGen; /* the ramp generation */
amcGen afterRampGen; /* the generation after rampGen */
unsigned rampCount; /* <design/poolamc/#ramp.count> */
int rampMode; /* <design/poolamc/#ramp.mode> */
unsigned rampCount; /* <design/poolamc#.ramp.count> */
int rampMode; /* <design/poolamc#.ramp.mode> */
amcPinnedFunction pinned; /* function determining if block is pinned */
Size extendBy; /* segment size to extend pool by */
Size largeSize; /* min size of "large" segments */
Sig sig; /* <design/pool/#outer-structure.sig> */
Sig sig; /* <design/pool#.outer-structure.sig> */
} AMCStruct;
@ -457,7 +457,7 @@ typedef struct amcBufStruct {
SegBufStruct segbufStruct; /* superclass fields must come first */
amcGen gen; /* The AMC generation */
Bool forHashArrays; /* allocates hash table arrays, see AMCBufferFill */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} amcBufStruct;
@ -523,7 +523,7 @@ static Res AMCBufInit(Buffer buffer, Pool pool, Bool isMutator, ArgList args)
/* Set up the buffer to be allocating in the nursery. */
amcbuf->gen = amc->nursery;
} else {
/* No gen yet -- see <design/poolamc/#gen.forward>. */
/* No gen yet -- see <design/poolamc#.gen.forward>. */
amcbuf->gen = NULL;
}
amcbuf->forHashArrays = forHashArrays;
@ -709,7 +709,7 @@ static void AMCVarargs(ArgStruct args[MPS_ARGS_MAX], va_list varargs)
/* amcInitComm -- initialize AMC/Z pool
*
* See <design/poolamc/#init>.
* <design/poolamc#.init>.
* Shared by AMCInit and AMCZinit.
*/
static Res amcInitComm(Pool pool, Arena arena, PoolClass klass,
@ -857,7 +857,7 @@ static Res AMCZInit(Pool pool, Arena arena, PoolClass klass, ArgList args)
/* AMCFinish -- finish AMC pool
*
* See <design/poolamc/#finish>.
* <design/poolamc#.finish>.
*/
static void AMCFinish(Inst inst)
{
@ -909,7 +909,7 @@ static void AMCFinish(Inst inst)
/* AMCBufferFill -- refill an allocation buffer
*
* See <design/poolamc/#fill>.
* <design/poolamc#.fill>.
*/
static Res AMCBufferFill(Addr *baseReturn, Addr *limitReturn,
Pool pool, Buffer buffer, Size size)
@ -952,7 +952,7 @@ static Res AMCBufferFill(Addr *baseReturn, Addr *limitReturn,
return res;
AVER(grainsSize == SegSize(seg));
/* <design/seg/#field.rankSet.start> */
/* <design/seg#.field.rankSet.start> */
if(BufferRankSet(buffer) == RankSetEMPTY)
SegSetRankAndSummary(seg, BufferRankSet(buffer), RefSetEMPTY);
else
@ -1002,7 +1002,7 @@ static Res AMCBufferFill(Addr *baseReturn, Addr *limitReturn,
/* amcSegBufferEmpty -- free from buffer to segment
*
* See <design/poolamc/#flush>.
* <design/poolamc#.flush>.
*/
static void amcSegBufferEmpty(Seg seg, Buffer buffer)
{
@ -1030,7 +1030,7 @@ static void amcSegBufferEmpty(Seg seg, Buffer buffer)
AVER(limit <= SegLimit(seg));
}
/* <design/poolamc/#flush.pad> */
/* <design/poolamc#.flush.pad> */
if (init < limit) {
ShieldExpose(arena, seg);
(*pool->format->pad)(init, AddrOffset(init, limit));
@ -1238,7 +1238,7 @@ static Res amcSegWhiten(Seg seg, Trace trace)
/* Ensure we are forwarding into the right generation. */
/* see <design/poolamc/#gen.ramp> */
/* see <design/poolamc#.gen.ramp> */
/* This switching needs to be more complex for multiple traces. */
AVER(TraceSetIsSingle(PoolArena(pool)->busyTraces));
if(amc->rampMode == RampBEGIN && gen == amc->rampGen) {
@ -1390,7 +1390,7 @@ static Res amcSegScanNailed(Bool *totalReturn, ScanState ss, Pool pool,
/* amcSegScan -- scan a single seg, turning it black
*
* See <design/poolamc/#seg-scan>.
* <design/poolamc#.seg-scan>.
*/
static Res amcSegScan(Bool *totalReturn, Seg seg, ScanState ss)
{
@ -1414,7 +1414,7 @@ static Res amcSegScan(Bool *totalReturn, Seg seg, ScanState ss)
}
base = AddrAdd(SegBase(seg), format->headerSize);
/* <design/poolamc/#seg-scan.loop> */
/* <design/poolamc#.seg-scan.loop> */
while (SegBuffer(&buffer, seg)) {
limit = AddrAdd(BufferScanLimit(buffer),
format->headerSize);
@ -1433,7 +1433,7 @@ static Res amcSegScan(Bool *totalReturn, Seg seg, ScanState ss)
base = limit;
}
/* <design/poolamc/#seg-scan.finish> @@@@ base? */
/* <design/poolamc#.seg-scan.finish> @@@@ base? */
limit = AddrAdd(SegLimit(seg), format->headerSize);
AVER(SegBase(seg) <= base);
AVER(base <= AddrAdd(SegLimit(seg), format->headerSize));
@ -1490,7 +1490,7 @@ static void amcSegFixInPlace(Seg seg, ScanState ss, Ref *refIO)
/* amcSegFixEmergency -- fix a reference, without allocating
*
* See <design/poolamc/#emergency.fix>.
* <design/poolamc#.emergency.fix>.
*/
static Res amcSegFixEmergency(Seg seg, ScanState ss, Ref *refIO)
{
@ -1520,7 +1520,7 @@ static Res amcSegFixEmergency(Seg seg, ScanState ss, Ref *refIO)
return ResOK;
}
fixInPlace: /* see <design/poolamc/>.Nailboard.emergency */
fixInPlace: /* see <design/poolamc>.Nailboard.emergency */
amcSegFixInPlace(seg, ss, refIO);
return ResOK;
}
@ -1528,7 +1528,7 @@ fixInPlace: /* see <design/poolamc/>.Nailboard.emergency */
/* amcSegFix -- fix a reference to the segment
*
* See <design/poolamc/#fix>.
* <design/poolamc#.fix>.
*/
static Res amcSegFix(Seg seg, ScanState ss, Ref *refIO)
{
@ -1550,7 +1550,7 @@ static Res amcSegFix(Seg seg, ScanState ss, Ref *refIO)
TraceId ti;
Trace trace;
/* <design/trace/#fix.noaver> */
/* <design/trace#.fix.noaver> */
AVERT_CRITICAL(ScanState, ss);
AVERT_CRITICAL(Seg, seg);
AVER_CRITICAL(refIO != NULL);
@ -1621,7 +1621,7 @@ static Res amcSegFix(Seg seg, ScanState ss, Ref *refIO)
/* Object is not preserved yet (neither moved, nor nailed) */
/* so should be preserved by forwarding. */
ss->wasMarked = FALSE; /* <design/fix/#was-marked.not> */
ss->wasMarked = FALSE; /* <design/fix#.was-marked.not> */
/* Get the forwarding buffer from the object's generation. */
gen = amcSegGen(seg);
@ -1650,7 +1650,7 @@ static Res amcSegFix(Seg seg, ScanState ss, Ref *refIO)
}
SegSetGrey(toSeg, TraceSetUnion(SegGrey(toSeg), grey));
/* <design/trace/#fix.copy> */
/* <design/trace#.fix.copy> */
(void)AddrCopy(newBase, base, length); /* .exposed.seg */
ShieldCover(arena, toSeg);
@ -1704,7 +1704,7 @@ static void amcSegReclaimNailed(Pool pool, Trace trace, Seg seg)
arena = PoolArena(pool);
AVERT(Arena, arena);
/* see <design/poolamc/#nailboard.limitations> for improvements */
/* see <design/poolamc#.nailboard.limitations> for improvements */
headerSize = format->headerSize;
ShieldExpose(arena, seg);
p = SegBase(seg);
@ -1790,7 +1790,7 @@ static void amcSegReclaimNailed(Pool pool, Trace trace, Seg seg)
/* amcSegReclaim -- recycle a segment if it is still white
*
* See <design/poolamc/#reclaim>.
* <design/poolamc#.reclaim>.
*/
static void amcSegReclaim(Seg seg, Trace trace)
{
@ -1932,7 +1932,7 @@ static Size AMCFreeSize(Pool pool)
/* AMCDescribe -- describe the contents of the AMC pool
*
* See <design/poolamc/#describe>.
* <design/poolamc#.describe>.
*/
static Res AMCDescribe(Inst inst, mps_lib_FILE *stream, Count depth)
@ -2090,7 +2090,7 @@ void mps_amc_apply(mps_pool_t mps_pool,
/* AMCCheck -- check consistency of the AMC pool
*
* See <design/poolamc/#check>.
* <design/poolamc#.check>.
*/
ATTRIBUTE_UNUSED

View file

@ -5,7 +5,7 @@
* Portions copyright (c) 2002 Global Graphics Software.
*
*
* .design: See <design/poolams/>.
* .design: <design/poolams>.
*
*
* TRANSGRESSSIONS
@ -75,7 +75,7 @@ Bool AMSSegCheck(AMSSeg amsseg)
CHECKD_NOSIG(BT, amsseg->allocTable);
if (SegWhite(seg) != TraceSetEMPTY) {
/* <design/poolams/#colour.single> */
/* <design/poolams#.colour.single> */
CHECKL(TraceSetIsSingle(SegWhite(seg)));
CHECKL(amsseg->colourTablesInUse);
}
@ -253,7 +253,7 @@ static Res AMSSegInit(Seg seg, Pool pool, Addr base, Size size, ArgList args)
amsseg->bufferedGrains = (Count)0;
amsseg->newGrains = (Count)0;
amsseg->oldGrains = (Count)0;
amsseg->marksChanged = FALSE; /* <design/poolams/#marked.unused> */
amsseg->marksChanged = FALSE; /* <design/poolams#.marked.unused> */
amsseg->ambiguousFixes = FALSE;
res = amsCreateTables(ams, &amsseg->allocTable,
@ -262,7 +262,7 @@ static Res AMSSegInit(Seg seg, Pool pool, Addr base, Size size, ArgList args)
if (res != ResOK)
goto failCreateTables;
/* start off using firstFree, see <design/poolams/#no-bit> */
/* start off using firstFree, see <design/poolams#.no-bit> */
amsseg->allocTableInUse = FALSE;
amsseg->firstFree = 0;
amsseg->colourTablesInUse = FALSE;
@ -308,15 +308,15 @@ static void AMSSegFinish(Inst inst)
*
* .empty: segment merging and splitting is limited to simple cases
* where the high segment is empty.
* See <design/poolams/#split-merge.constrain>.
* <design/poolams#.split-merge.constrain>.
*
* .grain-align: segment merging and splitting is limited to cases
* where the join is aligned with the grain alignment
* See <design/poolams/#split-merge.constrain>.
* <design/poolams#.split-merge.constrain>.
*
* .alloc-early: Allocations are performed before calling the
* next method to simplify the fail cases. See
* <design/seg/#split-merge.fail>
* <design/seg#.split-merge.fail>
*
* .table-names: The names of local variables holding the new
* allocation and colour tables are chosen to have names which
@ -483,10 +483,10 @@ static Res AMSSegSplit(Seg seg, Seg segHi,
amssegHi->bufferedGrains = (Count)0;
amssegHi->newGrains = (Count)0;
amssegHi->oldGrains = (Count)0;
amssegHi->marksChanged = FALSE; /* <design/poolams/#marked.unused> */
amssegHi->marksChanged = FALSE; /* <design/poolams#.marked.unused> */
amssegHi->ambiguousFixes = FALSE;
/* start off using firstFree, see <design/poolams/#no-bit> */
/* start off using firstFree, see <design/poolams#.no-bit> */
amssegHi->allocTableInUse = FALSE;
amssegHi->firstFree = 0;
/* use colour tables if the segment is white */
@ -701,7 +701,7 @@ static Res AMSSegCreate(Seg *segReturn, Pool pool, Size size,
goto failSeg;
}
/* see <design/seg/#field.rankset> */
/* see <design/seg#.field.rankset> */
if (rankSet != RankSetEMPTY) {
SegSetRankAndSummary(seg, rankSet, RefSetUNIV);
} else {
@ -770,7 +770,7 @@ static void AMSDebugVarargs(ArgStruct args[MPS_ARGS_MAX], va_list varargs)
/* AMSInit -- the pool class initialization method
*
* Takes one additional argument: the format of the objects
* allocated in the pool. See <design/poolams/#init>.
* allocated in the pool. <design/poolams#.init>.
*/
ARG_DEFINE_KEY(AMS_SUPPORT_AMBIGUOUS, Bool);
@ -893,7 +893,7 @@ static Bool amsSegBufferFill(Addr *baseReturn, Addr *limitReturn,
return FALSE;
if (RefSetUnion(SegWhite(seg), SegGrey(seg)) != TraceSetEMPTY)
/* Can't use a white or grey segment, see design.mps.poolams.fill.colour */
/* Can't use a white or grey segment, see <design/poolams#.fill.colour> */
return FALSE;
if (rankSet != SegRankSet(seg))
@ -950,7 +950,7 @@ found:
/* AMSBufferFill -- the pool class buffer fill method
*
* Iterates over the segments looking for space. See
* <design/poolams/#fill>.
* <design/poolams#.fill>.
*/
static Res AMSBufferFill(Addr *baseReturn, Addr *limitReturn,
Pool pool, Buffer buffer, Size size)
@ -968,11 +968,11 @@ static Res AMSBufferFill(Addr *baseReturn, Addr *limitReturn,
AVER(size > 0);
AVER(SizeIsAligned(size, PoolAlignment(pool)));
/* Check that we're not in the grey mutator phase (see */
/* <design/poolams/#fill.colour>). */
/* Check that we're not in the grey mutator phase */
/* <design/poolams#.fill.colour>. */
AVER(PoolArena(pool)->busyTraces == PoolArena(pool)->flippedTraces);
/* <design/poolams/#fill.slow> */
/* <design/poolams#.fill.slow> */
rankSet = BufferRankSet(buffer);
RING_FOR(node, &pool->segRing, nextNode) {
seg = SegOfPoolRing(node);
@ -993,7 +993,7 @@ static Res AMSBufferFill(Addr *baseReturn, Addr *limitReturn,
/* amsSegBufferEmpty -- empty buffer to segment
*
* Frees the unused part of the buffer. The colour of the area doesn't
* need to be changed. See <design/poolams/#empty>.
* need to be changed. <design/poolams#.empty>.
*/
static void amsSegBufferEmpty(Seg seg, Buffer buffer)
{
@ -1108,7 +1108,7 @@ static Res amsSegWhiten(Seg seg, Trace trace)
AVERT(Trace, trace);
/* <design/poolams/#colour.single> */
/* <design/poolams#.colour.single> */
AVER(SegWhite(seg) == TraceSetEMPTY);
AVER(!amsseg->colourTablesInUse);
@ -1135,7 +1135,7 @@ static Res amsSegWhiten(Seg seg, Trace trace)
amsseg->allocTableInUse = TRUE;
}
if (SegBuffer(&buffer, seg)) { /* <design/poolams/#condemn.buffer> */
if (SegBuffer(&buffer, seg)) { /* <design/poolams#.condemn.buffer> */
Index scanLimitIndex, limitIndex;
scanLimitIndex = PoolIndexOfAddr(SegBase(seg), pool, BufferScanLimit(buffer));
limitIndex = PoolIndexOfAddr(SegBase(seg), pool, BufferLimit(buffer));
@ -1159,7 +1159,7 @@ static Res amsSegWhiten(Seg seg, Trace trace)
amsseg->oldGrains += agedGrains + amsseg->newGrains;
amsseg->bufferedGrains = uncondemnedGrains;
amsseg->newGrains = 0;
amsseg->marksChanged = FALSE; /* <design/poolams/#marked.condemn> */
amsseg->marksChanged = FALSE; /* <design/poolams#.marked.condemn> */
amsseg->ambiguousFixes = FALSE;
if (amsseg->oldGrains > 0) {
@ -1326,7 +1326,7 @@ static Res amsScanObject(Seg seg, Index i, Addr p, Addr next, void *clos)
/* amsSegScan -- the segment scanning method
*
* See <design/poolams/#scan>
* <design/poolams#.scan>
*/
static Res amsSegScan(Bool *totalReturn, Seg seg, ScanState ss)
{
@ -1342,8 +1342,8 @@ static Res amsSegScan(Bool *totalReturn, Seg seg, ScanState ss)
AVER(totalReturn != NULL);
AVERT(ScanState, ss);
/* Check that we're not in the grey mutator phase (see */
/* <design/poolams/#not-req.grey>). */
/* Check that we're not in the grey mutator phase */
/* <design/poolams#.not-req.grey>. */
AVER(TraceSetSub(ss->traces, arena->flippedTraces));
closureStruct.scanAllObjects =
@ -1364,13 +1364,13 @@ static Res amsSegScan(Bool *totalReturn, Seg seg, ScanState ss)
format = pool->format;
AVERT(Format, format);
alignment = PoolAlignment(AMSPool(ams));
do { /* <design/poolams/#scan.iter> */
amsseg->marksChanged = FALSE; /* <design/poolams/#marked.scan> */
/* <design/poolams/#ambiguous.middle> */
do { /* <design/poolams#.scan.iter> */
amsseg->marksChanged = FALSE; /* <design/poolams#.marked.scan> */
/* <design/poolams#.ambiguous.middle> */
if (amsseg->ambiguousFixes) {
res = semSegIterate(seg, amsScanObject, &closureStruct);
if (res != ResOK) {
/* <design/poolams/#marked.scan.fail> */
/* <design/poolams#.marked.scan.fail> */
amsseg->marksChanged = TRUE;
*totalReturn = FALSE;
return res;
@ -1395,7 +1395,7 @@ static Res amsSegScan(Bool *totalReturn, Seg seg, ScanState ss)
j = PoolIndexOfAddr(SegBase(seg), pool, next);
res = FormatScan(format, ss, clientP, clientNext);
if (res != ResOK) {
/* <design/poolams/#marked.scan.fail> */
/* <design/poolams#.marked.scan.fail> */
amsseg->marksChanged = TRUE;
*totalReturn = FALSE;
return res;
@ -1439,7 +1439,7 @@ static Res amsSegFix(Seg seg, ScanState ss, Ref *refIO)
AVER_CRITICAL(amsseg->colourTablesInUse);
/* @@@@ We should check that we're not in the grey mutator phase */
/* (see <design/poolams/#not-req.grey>), but there's no way of */
/* <design/poolams#.not-req.grey>, but there's no way of */
/* doing that here (this can be called from RootScan, during flip). */
clientRef = *refIO;
@ -1483,13 +1483,13 @@ static Res amsSegFix(Seg seg, ScanState ss, Ref *refIO)
case RankFINAL:
case RankWEAK:
if (AMS_IS_WHITE(seg, i)) {
ss->wasMarked = FALSE; /* <design/fix/#was-marked.not> */
ss->wasMarked = FALSE; /* <design/fix#.was-marked.not> */
if (ss->rank == RankWEAK) { /* then splat the reference */
*refIO = (Ref)0;
} else {
STATISTIC(++ss->preservedInPlaceCount); /* Size updated on reclaim */
if (SegRankSet(seg) == RankSetEMPTY && ss->rank != RankAMBIG) {
/* <design/poolams/#fix.to-black> */
/* <design/poolams#.fix.to-black> */
Addr clientNext, next;
ShieldExpose(PoolArena(pool), seg);
@ -1502,7 +1502,7 @@ static Res amsSegFix(Seg seg, ScanState ss, Ref *refIO)
} else { /* turn it grey */
AMS_WHITE_GREYEN(seg, i);
SegSetGrey(seg, TraceSetUnion(SegGrey(seg), ss->traces));
/* mark it for scanning - <design/poolams/#marked.fix> */
/* mark it for scanning - <design/poolams#.marked.fix> */
amsseg->marksChanged = TRUE;
}
}

View file

@ -48,7 +48,7 @@ typedef struct AMSStruct {
AMSSegsDestroyFunction segsDestroy;
AMSSegClassFunction segClass;/* fn to get the class for segments */
Bool shareAllocTable; /* the alloc table is also used as white table */
Sig sig; /* <design/pool/#outer-structure.sig> */
Sig sig; /* <design/pool#.outer-structure.sig> */
} AMSStruct;
@ -63,7 +63,7 @@ typedef struct AMSSegStruct {
Bool allocTableInUse; /* allocTable is used */
Index firstFree; /* 1st free grain, if allocTable is not used */
BT allocTable; /* set if grain is allocated */
/* <design/poolams/#colour.single> */
/* <design/poolams#.colour.single> */
Bool marksChanged; /* seg has been marked since last scan */
Bool ambiguousFixes; /* seg has been ambiguously marked since last scan */
Bool colourTablesInUse;/* the colour tables are in use */

View file

@ -6,7 +6,7 @@
*
* DESIGN
*
* .design: See <design/poolawl/>. This is Dylan-specific pool.
* .design: <design/poolawl>. This is Dylan-specific pool.
*
*
* ASSUMPTIONS (about when to scan single references on accesses)
@ -92,7 +92,7 @@ typedef Addr (*FindDependentFunction)(Addr object);
/* AWLStruct -- AWL pool structure
*
* See <design/poolawl/#poolstruct>
* <design/poolawl#.poolstruct>
*/
typedef struct AWLPoolStruct {
@ -125,7 +125,7 @@ DECLARE_CLASS(Pool, AWLPool, AbstractCollectPool);
#define AWLSegSig ((Sig)0x519A3759) /* SIGnature AWL SeG */
/* <design/poolawl/#seg> */
/* <design/poolawl#.seg> */
typedef struct AWLSegStruct {
GCSegStruct gcSegStruct; /* superclass fields must come first */
BT mark;
@ -747,7 +747,7 @@ static Res awlSegWhiten(Seg seg, Trace trace)
/* All parameters checked by generic SegWhiten. */
/* Can only whiten for a single trace, */
/* see <design/poolawl/#fun.condemn> */
/* see <design/poolawl#.fun.condemn> */
AVER(SegWhite(seg) == TraceSetEMPTY);
if (!SegBuffer(&buffer, seg)) {
@ -869,9 +869,9 @@ static Res awlScanObject(Arena arena, AWL awl, ScanState ss,
dependentObject = awl->findDependent(base);
dependent = SegOfAddr(&dependentSeg, arena, dependentObject);
if (dependent) {
/* <design/poolawl/#fun.scan.pass.object.dependent.expose> */
/* <design/poolawl#.fun.scan.pass.object.dependent.expose> */
ShieldExpose(arena, dependentSeg);
/* <design/poolawl/#fun.scan.pass.object.dependent.summary> */
/* <design/poolawl#.fun.scan.pass.object.dependent.summary> */
SegSetSummary(dependentSeg, RefSetUNIV);
}
@ -915,7 +915,7 @@ static Res awlSegScanSinglePass(Bool *anyScannedReturn, ScanState ss,
Index i; /* the index into the bit tables corresponding to p */
Addr objectLimit;
/* <design/poolawl/#fun.scan.pass.buffer> */
/* <design/poolawl#.fun.scan.pass.buffer> */
if (p == bufferScanLimit) {
p = BufferLimit(buffer);
continue;
@ -928,7 +928,7 @@ static Res awlSegScanSinglePass(Bool *anyScannedReturn, ScanState ss,
}
hp = AddrAdd(p, format->headerSize);
objectLimit = (format->skip)(hp);
/* <design/poolawl/#fun.scan.pass.object> */
/* <design/poolawl#.fun.scan.pass.object> */
if (scanAllObjects
|| (BTGet(awlseg->mark, i) && !BTGet(awlseg->scanned, i))) {
Res res = awlScanObject(arena, awl, ss, pool->format,
@ -1033,7 +1033,7 @@ static Res awlSegFix(Seg seg, ScanState ss, Ref *refIO)
}
if (!BTGet(awlseg->mark, i)) {
ss->wasMarked = FALSE; /* <design/fix/#was-marked.not> */
ss->wasMarked = FALSE; /* <design/fix#.was-marked.not> */
if (ss->rank == RankWEAK) {
*refIO = (Ref)0;
} else {

View file

@ -5,7 +5,7 @@
*
* DESIGN
*
* .design: See <design/poollo/>. This is a leaf pool class.
* .design: <design/poollo>. This is a leaf pool class.
*/
#include "mpsclo.h"
@ -684,7 +684,7 @@ static Res loSegFix(Seg seg, ScanState ss, Ref *refIO)
}
if(!BTGet(loseg->mark, i)) {
ss->wasMarked = FALSE; /* <design/fix/#was-marked.not> */
ss->wasMarked = FALSE; /* <design/fix#.was-marked.not> */
if(ss->rank == RankWEAK) {
*refIO = (Addr)0;
} else {

View file

@ -5,7 +5,7 @@
*
* This is the implementation of the MFS pool class.
*
* See design.mps.poolmfs.
* <design/poolmfs>.
*
* .restriction: This pool cannot allocate from the arena control
* pool (as the control pool is an instance of PoolClassMV and MV uses
@ -188,7 +188,7 @@ void MFSExtend(Pool pool, Addr base, Addr limit)
extent. This transgresses the rule that pools should allocate
control structures from another pool, because an MFS is required
during bootstrap when no other pools are available. See
<design/poolmfs/#impl.extent-ring.justify> */
<design/poolmfs#.impl.extent-ring.justify> */
mfsRing = (Ring)base;
RingInit(mfsRing);
RingAppend(&mfs->extentRing, mfsRing);
@ -249,7 +249,7 @@ static Res MFSAlloc(Addr *pReturn, Pool pool, Size size)
{
Addr base;
/* See design.mps.bootstrap.land.sol.pool. */
/* <design/bootstrap#.land.sol.pool>. */
if (!mfs->extendSelf)
return ResLIMIT;

View file

@ -7,7 +7,7 @@
*
* DESIGN
*
* .design: See <design/poolmrg/>.
* .design: <design/poolmrg>.
*
* NOTES
*
@ -19,7 +19,7 @@
*
* TRANSGRESSIONS
*
* .addr.void-star: Breaks <design/type/#addr.use> all over the place,
* .addr.void-star: Breaks <design/type#.addr.use> all over the place,
* accessing the segments acquired from SegAlloc with C pointers. It
* would not be practical to use ArenaPeek/Poke everywhere. Blocks
* acquired from ControlAlloc must be directly accessible from C, or else
@ -103,10 +103,10 @@ static void MRGRefPartSetRef(Arena arena, RefPart refPart, Ref ref)
typedef struct MRGStruct {
PoolStruct poolStruct; /* generic pool structure */
RingStruct entryRing; /* <design/poolmrg/#poolstruct.entry> */
RingStruct freeRing; /* <design/poolmrg/#poolstruct.free> */
RingStruct refRing; /* <design/poolmrg/#poolstruct.refring> */
Size extendBy; /* <design/poolmrg/#extend> */
RingStruct entryRing; /* <design/poolmrg#.poolstruct.entry> */
RingStruct freeRing; /* <design/poolmrg#.poolstruct.free> */
RingStruct refRing; /* <design/poolmrg#.poolstruct.refring> */
Size extendBy; /* <design/poolmrg#.extend> */
Sig sig; /* <code/mps.h#sig> */
} MRGStruct;
@ -142,14 +142,14 @@ typedef struct MRGRefSegStruct *MRGRefSeg;
typedef struct MRGLinkSegStruct {
SegStruct segStruct; /* superclass fields must come first */
MRGRefSeg refSeg; /* <design/poolmrg/#mrgseg.link.refseg> */
MRGRefSeg refSeg; /* <design/poolmrg#.mrgseg.link.refseg> */
Sig sig; /* <code/misc.h#sig> */
} MRGLinkSegStruct;
typedef struct MRGRefSegStruct {
GCSegStruct gcSegStruct; /* superclass fields must come first */
RingStruct mrgRing; /* <design/poolmrg/#mrgseg.ref.segring> */
MRGLinkSeg linkSeg; /* <design/poolmrg/#mrgseg.ref.linkseg> */
RingStruct mrgRing; /* <design/poolmrg#.mrgseg.ref.segring> */
MRGLinkSeg linkSeg; /* <design/poolmrg#.mrgseg.ref.linkseg> */
Sig sig; /* <code/misc.h#sig> */
} MRGRefSegStruct;
@ -165,7 +165,7 @@ static Res mrgRefSegScan(Bool *totalReturn, Seg seg, ScanState ss);
*
* .link.nullref: During initialization of a link segment the refSeg
* field will be NULL. This will be initialized when the reference
* segment is initialized. See <design/poolmrg/#mrgseg.link.refseg>.
* segment is initialized. <design/poolmrg#.mrgseg.link.refseg>.
*/
ATTRIBUTE_UNUSED
@ -268,7 +268,7 @@ static Res MRGRefSegInit(Seg seg, Pool pool, Addr base, Size size, ArgList args)
/* no useful checks for base and size */
AVERT(MRGLinkSeg, linkseg);
/* <design/seg/#field.rankset.start>, .improve.rank */
/* <design/seg#.field.rankset.start>, .improve.rank */
SegSetRankSet(seg, RankSetSingle(RankFINAL));
RingInit(&refseg->mrgRing);
@ -340,7 +340,7 @@ static Count MRGGuardiansPerSeg(MRG mrg)
}
/* <design/poolmrg/#guardian.assoc> */
/* <design/poolmrg#.guardian.assoc> */
#define refPartOfIndex(refseg, index) \
@ -411,7 +411,7 @@ static void MRGGuardianInit(MRG mrg, Link link, RefPart refPart)
RingInit(&link->the.linkRing);
link->state = MRGGuardianFREE;
RingAppend(&mrg->freeRing, &link->the.linkRing);
/* <design/poolmrg/#free.overwrite> */
/* <design/poolmrg#.free.overwrite> */
MRGRefPartSetRef(PoolArena(MustBeA(AbstractPool, mrg)), refPart, 0);
}
@ -477,7 +477,7 @@ static MessageClassStruct MRGMessageClassStruct = {
MessageNoGCCondemnedSize, /* GCCondemnedSize */
MessageNoGCNotCondemnedSize, /* GCNotCondemnedSize */
MessageNoGCStartWhy, /* GCStartWhy */
MessageClassSig /* <design/message/#class.sig.double> */
MessageClassSig /* <design/message#.class.sig.double> */
};
@ -701,7 +701,7 @@ static void MRGFinish(Inst inst)
mrg->sig = SigInvalid;
RingFinish(&mrg->refRing);
/* <design/poolmrg/#trans.no-finish> */
/* <design/poolmrg#.trans.no-finish> */
NextMethod(Inst, MRGPool, finish)(inst);
}
@ -721,7 +721,7 @@ Res MRGRegister(Pool pool, Ref ref)
AVER(ref != 0);
/* <design/poolmrg/#alloc.grow> */
/* <design/poolmrg#.alloc.grow> */
if (RingIsSingle(&mrg->freeRing)) {
res = MRGSegPairCreate(&junk, mrg);
if (res != ResOK)
@ -732,12 +732,12 @@ Res MRGRegister(Pool pool, Ref ref)
link = linkOfRing(freeNode);
AVER(link->state == MRGGuardianFREE);
/* <design/poolmrg/#alloc.pop> */
/* <design/poolmrg#.alloc.pop> */
RingRemove(freeNode);
link->state = MRGGuardianPREFINAL;
RingAppend(&mrg->entryRing, freeNode);
/* <design/poolmrg/#guardian.ref.alloc> */
/* <design/poolmrg#.guardian.ref.alloc> */
refPart = MRGRefPartOfLink(link, arena);
MRGRefPartSetRef(arena, refPart, ref);

View file

@ -6,7 +6,7 @@
* .purpose: A manual-variable pool designed to take advantage of
* placement according to predicted deathtime.
*
* .design: See <design/poolmvt/>.
* .design: <design/poolmvt>.
*/
#include "mpm.h"
@ -69,20 +69,20 @@ typedef struct MVTStruct
FreelistStruct flStruct; /* The emergency free list structure */
FailoverStruct foStruct; /* The fail-over mechanism */
ABQStruct abqStruct; /* The available block queue */
/* <design/poolmvt/#arch.parameters> */
/* <design/poolmvt#.arch.parameters> */
Size minSize; /* Pool parameter */
Size meanSize; /* Pool parameter */
Size maxSize; /* Pool parameter */
Count fragLimit; /* Pool parameter */
/* <design/poolmvt/#arch.overview.abq.reuse.size> */
/* <design/poolmvt#.arch.overview.abq.reuse.size> */
Size reuseSize; /* Size at which blocks are recycled */
/* <design/poolmvt/#arch.ap.fill.size> */
/* <design/poolmvt#.arch.ap.fill.size> */
Size fillSize; /* Size of pool segments */
/* <design/poolmvt/#arch.contingency> */
/* <design/poolmvt#.arch.contingency> */
Size availLimit; /* Limit on available */
/* <design/poolmvt/#impl.c.free.merge.segment.overflow> */
/* <design/poolmvt#.impl.c.free.merge.segment.overflow> */
Bool abqOverflow; /* ABQ dropped some candidates */
/* <design/poolmvt/#arch.ap.no-fit>.* */
/* <design/poolmvt#.arch.ap.no-fit> */
Bool splinter; /* Saved splinter */
Addr splinterBase; /* Saved splinter base */
Addr splinterLimit; /* Saved splinter size */
@ -259,7 +259,7 @@ static Res MVTInit(Pool pool, Arena arena, PoolClass klass, ArgList args)
AVERT(Align, align);
/* This restriction on the alignment is necessary because of the use
of a Freelist to store the free address ranges in low-memory
situations. See <design/freelist/#impl.grain.align>. */
situations. <design/freelist#.impl.grain.align>. */
AVER(AlignIsAligned(align, FreelistMinimumAlignment));
AVER(align <= ArenaGrainSize(arena));
AVER(0 < minSize);
@ -269,9 +269,9 @@ static Res MVTInit(Pool pool, Arena arena, PoolClass klass, ArgList args)
AVER(fragLimit <= 100);
/* TODO: More parameter checks possible? */
/* see <design/poolmvt/#arch.parameters> */
/* see <design/poolmvt#.arch.parameters> */
fillSize = SizeArenaGrains(maxSize, arena);
/* see <design/poolmvt/#arch.fragmentation.internal> */
/* see <design/poolmvt#.arch.fragmentation.internal> */
reuseSize = 2 * fillSize;
abqDepth = (reserveDepth * meanSize + reuseSize - 1) / reuseSize;
/* keep the abq from being useless */
@ -521,8 +521,8 @@ static Res MVTOversizeFill(Addr *baseReturn,
* to the unavailable total. (We deliberately lose these fragments
* now so as to avoid the more severe fragmentation that we believe
* would result if we used these for allocation. See
* design.mps.poolmvt.arch.fragmentation.internal and
* design.mps.poolmvt.anal.policy.size.)
* <design/poolmvt#.arch.fragmentation.internal> and
* <design/poolmvt#.anal.policy.size>.)
*/
mvt->available -= alignedSize - minSize;
mvt->unavailable += alignedSize - minSize;
@ -689,7 +689,7 @@ static Res MVTSegFill(Addr *baseReturn, Addr *limitReturn,
/* MVTBufferFill -- refill an allocation buffer from an MVT pool
*
* See <design/poolmvt/#impl.c.ap.fill>
* <design/poolmvt#.impl.c.ap.fill>
*/
static Res MVTBufferFill(Addr *baseReturn, Addr *limitReturn,
Pool pool, Buffer buffer, Size minSize)
@ -708,14 +708,14 @@ static Res MVTBufferFill(Addr *baseReturn, Addr *limitReturn,
AVER(SizeIsAligned(minSize, pool->alignment));
/* Allocate oversize blocks exactly, directly from the arena.
<design/poolmvt/#arch.ap.no-fit.oversize> */
<design/poolmvt#.arch.ap.no-fit.oversize> */
if (minSize > mvt->fillSize) {
return MVTOversizeFill(baseReturn, limitReturn, mvt,
minSize);
}
/* Use any splinter, if available.
<design/poolmvt/#arch.ap.no-fit.return> */
<design/poolmvt#.arch.ap.no-fit.return> */
if (MVTSplinterFill(baseReturn, limitReturn, mvt, minSize))
return ResOK;
@ -726,7 +726,7 @@ static Res MVTBufferFill(Addr *baseReturn, Addr *limitReturn,
METER_ACC(mvt->underflows, minSize);
/* If fragmentation is acceptable, attempt to find a free block from
the free lists. <design/poolmvt/#arch.contingency.fragmentation-limit> */
the free lists. <design/poolmvt#.arch.contingency.fragmentation-limit> */
if (mvt->available >= mvt->availLimit) {
METER_ACC(mvt->fragLimitContingencies, minSize);
if (MVTContingencyFill(baseReturn, limitReturn, mvt, minSize))
@ -734,7 +734,7 @@ static Res MVTBufferFill(Addr *baseReturn, Addr *limitReturn,
}
/* Attempt to request a block from the arena.
<design/poolmvt/#impl.c.free.merge.segment> */
<design/poolmvt#.impl.c.free.merge.segment> */
res = MVTSegFill(baseReturn, limitReturn,
mvt, mvt->fillSize, minSize);
if (res == ResOK)
@ -787,7 +787,7 @@ static Bool MVTReserve(MVT mvt, Range range)
AVERT(Range, range);
AVER(RangeSize(range) >= mvt->reuseSize);
/* See <design/poolmvt/#impl.c.free.merge> */
/* <design/poolmvt#.impl.c.free.merge> */
if (!ABQPush(MVTABQ(mvt), range)) {
Arena arena = PoolArena(MVTPool(mvt));
RangeStruct oldRange;
@ -881,7 +881,7 @@ static Res MVTDelete(MVT mvt, Addr base, Addr limit)
/* MVTBufferEmpty -- return an unusable portion of a buffer to the MVT
* pool
*
* See <design/poolmvt/#impl.c.ap.empty>
* <design/poolmvt#.impl.c.ap.empty>
*/
static void MVTBufferEmpty(Pool pool, Buffer buffer)
{
@ -914,7 +914,7 @@ static void MVTBufferEmpty(Pool pool, Buffer buffer)
METER_ACC(mvt->poolSize, mvt->size);
METER_ACC(mvt->bufferEmpties, size);
/* <design/poolmvt/#arch.ap.no-fit.splinter> */
/* <design/poolmvt#.arch.ap.no-fit.splinter> */
if (size < mvt->minSize) {
res = MVTInsert(mvt, base, limit);
AVER(res == ResOK);
@ -923,7 +923,7 @@ static void MVTBufferEmpty(Pool pool, Buffer buffer)
}
METER_ACC(mvt->splinters, size);
/* <design/poolmvt/#arch.ap.no-fit.return> */
/* <design/poolmvt#.arch.ap.no-fit.return> */
if (mvt->splinter) {
Size oldSize = AddrOffset(mvt->splinterBase, mvt->splinterLimit);
@ -950,7 +950,7 @@ static void MVTBufferEmpty(Pool pool, Buffer buffer)
/* MVTFree -- free a block (previously allocated from a buffer) that
* is no longer in use
*
* see <design/poolmvt/#impl.c.free>
* see <design/poolmvt#.impl.c.free>
*/
static void MVTFree(Pool pool, Addr base, Size size)
{
@ -976,7 +976,7 @@ static void MVTFree(Pool pool, Addr base, Size size)
METER_ACC(mvt->poolAllocated, mvt->allocated);
METER_ACC(mvt->poolSize, mvt->size);
/* <design/poolmvt/#arch.ap.no-fit.oversize.policy> */
/* <design/poolmvt#.arch.ap.no-fit.oversize.policy> */
/* Return exceptional blocks directly to arena */
if (size > mvt->fillSize) {
Seg seg = NULL; /* suppress "may be used uninitialized" */
@ -1147,7 +1147,7 @@ static Res MVTSegAlloc(Seg *segReturn, MVT mvt, Size size)
if (res == ResOK) {
Size segSize = SegSize(*segReturn);
/* see <design/poolmvt/#arch.fragmentation.internal> */
/* see <design/poolmvt#.arch.fragmentation.internal> */
AVER(segSize >= mvt->fillSize);
mvt->size += segSize;
mvt->available += segSize;

View file

@ -5,7 +5,7 @@
*
* .purpose: The implementation of the new manual-variable pool class
*
* .design: See <design/poolmvt/>
* .design: <design/poolmvt>
*/
#ifndef poolmv2_h

View file

@ -191,8 +191,8 @@ static Res MVFFExtend(Range rangeReturn, MVFF mvff, Size size)
AVER(SizeIsAligned(size, PoolAlignment(pool)));
/* Use extendBy unless it's too small (see */
/* <design/poolmvff/#design.acquire-size>). */
/* Use extendBy unless it's too small */
/* <design/poolmvff#.design.acquire-size>. */
if (size <= mvff->extendBy)
allocSize = mvff->extendBy;
else
@ -203,7 +203,7 @@ static Res MVFFExtend(Range rangeReturn, MVFF mvff, Size size)
res = ArenaAlloc(&base, MVFFLocusPref(mvff), allocSize, pool);
if (res != ResOK) {
/* try again with a range just large enough for object */
/* see <design/poolmvff/#design.seg-fail> */
/* see <design/poolmvff#.design.seg-fail> */
allocSize = SizeArenaGrains(size, arena);
res = ArenaAlloc(&base, MVFFLocusPref(mvff), allocSize, pool);
if (res != ResOK)
@ -333,7 +333,7 @@ static void MVFFFree(Pool pool, Addr old, Size size)
/* MVFFBufferFill -- Fill the buffer
*
* Fill it with the largest block we can find. This is worst-fit
* allocation policy; see <design/poolmvff/#over.buffer>.
* allocation policy; see <design/poolmvff#.over.buffer>.
*/
static Res MVFFBufferFill(Addr *baseReturn, Addr *limitReturn,
Pool pool, Buffer buffer, Size size)
@ -415,7 +415,7 @@ static Res MVFFInit(Pool pool, Arena arena, PoolClass klass, ArgList args)
AVERC(PoolClass, klass);
/* .arg: class-specific additional arguments; see */
/* <design/poolmvff/#method.init> */
/* <design/poolmvff#.method.init> */
/* .arg.check: we do the same checks here and in MVFFCheck */
/* except for arenaHigh, which is stored only in the locusPref. */
@ -448,7 +448,7 @@ static Res MVFFInit(Pool pool, Arena arena, PoolClass klass, ArgList args)
AVERT(Align, align);
/* This restriction on the alignment is necessary because of the use
of a Freelist to store the free address ranges in low-memory
situations. <design/freelist/#impl.grain.align>. */
situations. <design/freelist#.impl.grain.align>. */
AVER(AlignIsAligned(align, FreelistMinimumAlignment));
AVER(align <= ArenaGrainSize(arena));
AVERT(Bool, slotHigh);

View file

@ -8,7 +8,7 @@
* variable size where address-ordered first (or last) fit is an
* appropriate policy.
*
* .design: See <design/poolmvff/>
* .design: <design/poolmvff>
*/
#ifndef poolmvff_h

View file

@ -31,7 +31,7 @@ extern PoolClass PoolClassN(void);
/* PoolNCheck -- check a pool of class N
*
* Validates a PoolN object. This function conforms to the validation
* protocol defined in <design/check/>.
* protocol defined in <design/check>.
*/
extern Bool PoolNCheck(PoolN poolN);

View file

@ -5,14 +5,14 @@
*
* DESIGN
*
* .design: design.mps.poolsnc
* .design: <design/poolsnc>
*
* LIGHTWEIGHT FRAMES
*
* .lw-frame-state: The pool uses lightweight frames as its only
* type of allocation frame. The lightweight frame state is set to
* Valid whenever a buffer has a segment and Disabled otherwise.
* See <design/alloc-frame/#lw-frame.states>.
* <design/alloc-frame#.lw-frame.states>.
*
* .lw-frame-null: The frame marker NULL is used as a special value
* to indicate bottom of stack.
@ -26,7 +26,7 @@ SRCID(poolsnc, "$Id$");
/* SNCStruct -- structure for an SNC pool
*
* See design.mps.poolsnc.poolstruct.
* <design/poolsnc#.poolstruct>.
*/
#define SNCSig ((Sig)0x519b754c) /* SIGPooLSNC */
@ -78,7 +78,7 @@ typedef struct SNCBufStruct *SNCBuf;
typedef struct SNCBufStruct {
SegBufStruct segBufStruct; /* superclass fields must come first */
Seg topseg; /* The segment chain head -- may be NULL */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
} SNCBufStruct;
@ -462,7 +462,7 @@ static Res SNCBufferFill(Addr *baseReturn, Addr *limitReturn,
return res;
found:
/* <design/seg/#field.rankSet.start> */
/* <design/seg#.field.rankSet.start> */
if (BufferRankSet(buffer) == RankSetEMPTY)
SegSetRankAndSummary(seg, BufferRankSet(buffer), RefSetEMPTY);
else

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2016 Ravenbrook Limited. See end of file for license.
*
* See <design/prmc/> for the design of the generic interface including
* See <design/prmc> for the design of the generic interface including
* the contracts for these functions.
*
* This interface has several different implementations, typically one

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
* In this version, for a generic operating system, none of the
* functions have a useful implementation.
*/

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2016 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
* In this version for a generic processor architecture, none of the
* functions have a useful implementation.
*/

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* SOURCES

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* ASSUMPTIONS

View file

@ -3,11 +3,11 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* .design: See <design/prmc/> for the generic design of the interface
* .design: See <design/prmc> for the generic design of the interface
* which is implemented in this module, including the contracts for the
* functions.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
* .requirements: Current requirements are for limited support only, for
* stepping the sorts of instructions that the Dylan compiler might

View file

@ -3,11 +3,11 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* .design: See <design/prmc/> for the generic design of the interface
* .design: See <design/prmc> for the generic design of the interface
* which is implemented in this module, including the contracts for the
* functions.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* SOURCES

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2016-2018 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* ASSUMPTIONS

View file

@ -15,7 +15,7 @@
#include <ucontext.h> /* ucontext_t */
typedef struct MutatorContextStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
MutatorContextVar var; /* Discriminator. */
siginfo_t *info; /* Signal info, if stopped by protection
* fault; NULL if stopped by thread manager. */

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* SOURCES

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* SOURCES

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2016 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* ASSUMPTIONS

View file

@ -13,7 +13,7 @@
#include "mpswin.h"
typedef struct MutatorContextStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
MutatorContextVar var; /* Union discriminator */
union {
LPEXCEPTION_POINTERS ep; /* Windows Exception Pointers */

View file

@ -5,7 +5,7 @@
*
* PURPOSE
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
* SOURCES
*
@ -19,7 +19,7 @@
*
* .assume.sp: The stack pointer is stored in CONTEXT.Esp. This
* requires CONTEXT_CONTROL to be set in ContextFlags when
* GetThreadContext is called (see <code/prmcw3.c>).
* GetThreadContext is called <code/prmcw3.c>.
*/
#include "prmcw3.h"

View file

@ -5,7 +5,7 @@
*
* PURPOSE
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
* SOURCES
*

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2016-2018 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* ASSUMPTIONS

View file

@ -15,7 +15,7 @@
#include <mach/i386/thread_status.h>
typedef struct MutatorContextStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
MutatorContextVar var; /* Discriminator. */
Addr address; /* Fault address, if stopped by protection
* fault; NULL if stopped by thread manager. */

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* SOURCES

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
*
* .purpose: Implement the mutator context module. See <design/prmc/>.
* .purpose: Implement the mutator context module. <design/prmc>.
*
*
* SOURCES

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2014-2016 Ravenbrook Limited. See end of file for license.
*
* See <design/prot/> for the design of the generic interface including
* See <design/prot> for the design of the generic interface including
* the contracts for these functions.
*
* This interface has several different implementations, typically one

View file

@ -6,7 +6,7 @@
*
* DESIGN
*
* <design/protan/>
* <design/protan>
*/
#include "mpm.h"
@ -44,7 +44,7 @@ void ProtSet(Addr base, Addr limit, AccessSet pm)
/* ProtSync -- synchronize protection settings with hardware
*
* See <design/protan/#fun.sync>.
* <design/protan#.fun.sync>.
*/
void ProtSync(Arena arena)
@ -59,7 +59,7 @@ void ProtSync(Arena arena)
synced = TRUE;
if (SegFirst(&seg, arena)) {
do {
if (SegPM(seg) != AccessSetEMPTY) { /* <design/protan/#fun.sync.seg> */
if (SegPM(seg) != AccessSetEMPTY) { /* <design/protan#.fun.sync.seg> */
ShieldEnter(arena);
TraceSegAccess(arena, seg, SegPM(seg));
ShieldLeave(arena);

View file

@ -5,7 +5,7 @@
* $Id$
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
*
* See design.mps.protocol.
* <design/protocol>.
*/
#include "mpm.h"

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2001-2018 Ravenbrook Limited. See end of file for license.
*
* See design.mps.protocol.
* <design/protocol>.
*/
#ifndef protocol_h
@ -18,8 +18,8 @@
* These turn the base identifier of a class (e.g. "Inst") into other
* identifiers (e.g. "InstClassStruct"). These are not intended to be
* used outside of this file. These macros implement
* design.mps.protocol.overview.naming and
* design.mps.impl.derived-names.
* <design/protocol#.overview.naming> and
* <design/impl#.derived-names>.
*
* INST_TYPE derives the type of an instance of the class,
* e.g. "Land", which will be a pointer to an INST_STRUCT.
@ -88,7 +88,7 @@ typedef void *ClassId;
*
* Declares a prototype for the class ensure function, which ensures
* that the class is initialized once and return it. See
* design.mps.protocol.if.declare-class.
* <design/protocol#.if.declare-class>.
*/
#define DECLARE_CLASS(kind, klass, super) \
@ -104,7 +104,7 @@ typedef void *ClassId;
* object for a class. Takes care to avoid initializing the class
* twice, even when called asynchronously from multiple threads, since
* this code can be reached without first entering an arena. See
* design.mps.protocol.if.define-class.
* <design/protocol#.if.define-class>.
*/
#define DEFINE_CLASS(kind, className, var) \
@ -135,7 +135,7 @@ typedef void *ClassId;
/* CLASS -- expression for getting a class
*
* Use this to get a class, rather than calling anything defined by
* DEFINE_CLASS directly. See design.mps.protocol.if.class.
* DEFINE_CLASS directly. <design/protocol#.if.class>.
*/
#define CLASS(klass) (CLASS_ENSURE(klass)())
@ -145,7 +145,7 @@ typedef void *ClassId;
*
* This macro is used at the start of a class definition to inherit
* the superclass and override the fields essential to the workings of
* the protocol. See design.mps.protocol.if.inheritance.
* the protocol. <design/protocol#.if.inheritance>.
*/
#define INHERIT_CLASS(this, _class, super) \
@ -164,7 +164,7 @@ typedef void *ClassId;
*
* An InstStruct named instStruct must be the first field of any
* instance structure using the protocol
* (design.mps.protocol.overview.prefix).
* <design/protocol#.overview.prefix>.
*/
typedef struct InstStruct *Inst;
@ -186,7 +186,7 @@ typedef void (*FinishMethod)(Inst inst);
typedef struct InstClassStruct {
InstStruct instStruct; /* classes are instances of kinds */
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
ClassName name; /* human readable name such as "Land" */
InstClass superclass; /* pointer to direct superclass */
ClassLevel level; /* distance from root of class hierarchy */
@ -220,7 +220,7 @@ extern void ClassRegister(InstClass klass);
*
* The InstClassStruct is arranged to make these tests fast and
* simple, so that it can be used as a consistency check in the MPS.
* See design.mps.protocol.impl.subclass.
* <design/protocol#.impl.subclass>.
*/
#define IsSubclass(sub, super) \
@ -238,16 +238,16 @@ extern void ClassRegister(InstClass klass);
/* CouldBeA, MustBeA -- coerce instances
*
* CouldBeA converts an instance to another class without checking,
* like C++ ``static_cast``. See design.mps.protocol.if.could-be-a.
* like C++ ``static_cast``. <design/protocol#.if.could-be-a>.
*
* MustBeA converts an instance to another class, but checks that the
* object is a subclass, causing an assertion if not (depending on
* build variety). See design.mps.protocol.if.must-be-a. It is like
* build variety). <design/protocol#.if.must-be-a>. It is like
* C++ "dynamic_cast" with an assert.
*
* MustBeA_CRITICAL is like MustBeA for use on the critical path,
* where it does no checking at all in production builds. See
* design.mps.protocol.if.must-be-a.critical.
* <design/protocol#.if.must-be-a.critical>.
*/
#define CouldBeA(klass, inst) ((INST_TYPE(klass))(inst))
@ -269,7 +269,7 @@ extern void ClassRegister(InstClass klass);
*
* The following are macros because of the need to cast subtypes of
* InstClass. Nevertheless they are named as functions. See
* design.mps.protocol.introspect.
* <design/protocol#.introspect>.
*/
#define SuperclassPoly(kind, klass) \
@ -292,7 +292,7 @@ extern void ClassRegister(InstClass klass);
*
* This should only be used when specialising an instance to be a
* member of a subclass, once the instance has been initialized. See
* design.mps.protocol.if.set-class-of-poly.
* <design/protocol#.if.set-class-of-poly>.
*/
#define SetClassOfPoly(inst, _class) \
@ -302,7 +302,7 @@ extern void ClassRegister(InstClass klass);
/* Method -- method call
*
* Use this macro to call a method on a class, rather than accessing
* the class directly. See design.mps.protocol.if.method. For
* the class directly. <design/protocol#.if.method>. For
* example:
*
* res = Method(Land, land, insert)(land, range);
@ -313,7 +313,7 @@ extern void ClassRegister(InstClass klass);
/* NextMethod -- call a method in the superclass
*
* See design.mps.protocol.int.static-superclass.
* <design/protocol#.int.static-superclass>.
*
* TODO: All uses of NextMethod are statically known, but several
* experiments with statically generating some kind of SUPERCLASS

View file

@ -92,8 +92,8 @@ LONG WINAPI ProtSEHfilter(LPEXCEPTION_POINTERS info)
action = EXCEPTION_CONTINUE_SEARCH;
} else {
/* Access on last sizeof(Addr) (ie 4 on this platform) bytes */
/* in memory. We assume we can't get this page anyway (see */
/* <code/vmw3.c#assume.not-last>) so it can't be our fault. */
/* in memory. We assume we can't get this page anyway */
/* <code/vmw3.c#assume.not-last> so it can't be our fault. */
action = EXCEPTION_CONTINUE_SEARCH;
}

View file

@ -378,13 +378,13 @@ static void protExcThreadStart(void)
/* protAtForkChild -- support for fork()
* <design/thread-safety/#sol.fork.exc-thread>
* <design/thread-safety#.sol.fork.exc-thread>
*/
static void protAtForkChild(void)
{
/* Restart the exception handling thread
<design/thread-safety/#sol.fork.exc-thread>. */
<design/thread-safety#.sol.fork.exc-thread>. */
protExcThreadStart();
}
@ -395,7 +395,7 @@ static void protSetupInner(void)
{
protExcThreadStart();
/* Install fork handlers <design/thread-safety/#sol.fork.atfork>. */
/* Install fork handlers <design/thread-safety#.sol.fork.atfork>. */
pthread_atfork(NULL, NULL, protAtForkChild);
}

View file

@ -5,7 +5,7 @@
*
* .purpose: Provides extension to Pthreads.
*
* .design: see <design/pthreadext/>
* .design: see <design/pthreadext>
*
* .acknowledgements: This was derived from code posted to
* comp.programming.threads by Dave Butenhof and Raymond Lau
@ -32,7 +32,7 @@ SRCID(pthreadext, "$Id$");
/* Static data initialized on first use of the module
* See <design/pthreadext/#impl.static>.*
* <design/pthreadext#.impl.static>
*/
/* mutex */
@ -47,7 +47,7 @@ static Bool pthreadextModuleInitialized = FALSE;
/* Global variables protected by the mutex
* See <design/pthreadext/#impl.global>.*
* <design/pthreadext#.impl.global>
*/
static PThreadext suspendingVictim = NULL; /* current victim */
@ -56,7 +56,7 @@ static RingStruct suspendedRing; /* PThreadext suspend ring */
/* suspendSignalHandler -- signal handler called when suspending a thread
*
* See <design/pthreadext/#impl.suspend-handler>
* <design/pthreadext#.impl.suspend-handler>
*
* Handle PTHREADEXT_SIGSUSPEND in the target thread, to suspend it until
* receiving PTHREADEXT_SIGRESUME (resume). Note that this is run with both
@ -97,7 +97,7 @@ static void suspendSignalHandler(int sig,
/* resumeSignalHandler -- signal handler called when resuming a thread
*
* See <design/pthreadext/#impl.suspend-handler>
* <design/pthreadext#.impl.suspend-handler>
*/
static void resumeSignalHandler(int sig)
@ -108,7 +108,7 @@ static void resumeSignalHandler(int sig)
/* PThreadextModuleInit -- Initialize the PThreadext module
*
* See <design/pthreadext/#impl.static.init>
* <design/pthreadext#.impl.static.init>
*
* Dynamically initialize all state when first used
* (called by pthread_once).
@ -212,7 +212,7 @@ void PThreadextInit(PThreadext pthreadext, pthread_t id)
/* PThreadextFinish -- Finish a pthreadext
*
* See <design/pthreadext/#impl.finish>
* <design/pthreadext#.impl.finish>
*/
void PThreadextFinish(PThreadext pthreadext)
@ -246,7 +246,7 @@ void PThreadextFinish(PThreadext pthreadext)
/* PThreadextSuspend -- suspend a thread
*
* See <design/pthreadext/#impl.suspend>
* <design/pthreadext#.impl.suspend>
*/
Res PThreadextSuspend(PThreadext target, MutatorContext *contextReturn)
@ -308,7 +308,7 @@ unlock:
/* PThreadextResume -- resume a suspended thread
*
* See <design/pthreadext/#impl.resume>
* <design/pthreadext#.impl.resume>
*/
Res PThreadextResume(PThreadext target)

View file

@ -30,7 +30,7 @@ typedef struct PThreadextStruct *PThreadext;
*/
typedef struct PThreadextStruct {
Sig sig; /* <design/sig/> */
Sig sig; /* <design/sig> */
pthread_t id; /* Thread ID */
MutatorContext context; /* context if suspended */
RingStruct threadRing; /* ring of suspended threads */

View file

@ -3,7 +3,7 @@
* $Id$
* Copyright (c) 2013-2018 Ravenbrook Limited. See end of file for license.
*
* .design: <design/range/>
* .design: <design/range>
*/
#include "check.h"

View file

@ -5,7 +5,7 @@
*
* .purpose: Representation of address ranges.
*
* .design: <design/range/>
* .design: <design/range>
*/
#ifndef range_h

Some files were not shown because too many files have changed in this diff Show more