1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-06 22:31:13 -07:00

Ensure the return code of poolaccess gets checked

Copied from Perforce
 Change: 19445
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Tony Mann 1998-04-23 10:42:09 +01:00
parent 93e0ce8c5e
commit 12e5434eeb

View file

@ -1,6 +1,6 @@
/* impl.c.arena: ARENA IMPLEMENTATION
*
* $HopeName: MMsrc!arena.c(trunk.36) $
* $HopeName: MMsrc!arena.c(trunk.37) $
* Copyright (C) 1998. Harlequin Group plc. All rights reserved.
*
* .readership: Any MPS developer
@ -36,7 +36,7 @@
#include "poolmrg.h"
#include "mps.h"
SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.36) $");
SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.37) $");
/* All static data objects are declared here. See .static */
@ -473,6 +473,7 @@ Bool ArenaAccess(Addr addr, AccessSet mode, MutatorFaultContext context)
{
Seg seg;
Ring node, nextNode;
Res res;
LockClaim(&arenaRingLock); /* design.mps.arena.lock.ring */
RING_FOR(node, &arenaRing, nextNode) {
@ -493,8 +494,10 @@ Bool ArenaAccess(Addr addr, AccessSet mode, MutatorFaultContext context)
* a separate thread.
*/
mode &= SegPM(seg);
if(mode != AccessSetEMPTY)
PoolAccess(SegPool(seg), seg, addr, mode, context);
if(mode != AccessSetEMPTY) {
res = PoolAccess(SegPool(seg), seg, addr, mode, context);
AVER(res == ResOK); /* Mutator can't continue unless this succeeds */
}
ArenaLeave(arena);
return TRUE;
} else if(RootOfAddr(&root, arena, addr)) {