mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-27 01:01:52 -07:00
Catch-up merge from custom/cet/branch/2016-09-13/job004006 to branch/2016-09-06/job004006.
Copied from Perforce Change: 192351 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
8340e390a5
commit
3cd7835844
3 changed files with 7 additions and 12 deletions
|
|
@ -73,14 +73,14 @@ static void arenaAnnounce(Arena arena)
|
|||
}
|
||||
|
||||
|
||||
/* ArenaDenounce -- remove an arena from the global ring of arenas
|
||||
/* arenaDenounce -- remove an arena from the global ring of arenas
|
||||
*
|
||||
* After this, no other thread can access the arena through ArenaAccess.
|
||||
* On entry, the arena should be locked. On exit, it will still be, but
|
||||
* the lock has been released and reacquired in the meantime, so callers
|
||||
* should not assume anything about the state of the arena. */
|
||||
|
||||
void ArenaDenounce(Arena arena)
|
||||
static void arenaDenounce(Arena arena)
|
||||
{
|
||||
Globals arenaGlobals;
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals)
|
|||
|
||||
arena = GlobalsArena(arenaGlobals);
|
||||
|
||||
ArenaDenounce(arena);
|
||||
arenaDenounce(arena);
|
||||
|
||||
defaultChain = arenaGlobals->defaultChain;
|
||||
arenaGlobals->defaultChain = NULL;
|
||||
|
|
|
|||
|
|
@ -487,7 +487,6 @@ extern Res ArenaDescribeTracts(Arena arena, mps_lib_FILE *stream, Count depth);
|
|||
extern Bool ArenaAccess(Addr addr, AccessSet mode, MutatorFaultContext context);
|
||||
extern Res ArenaFreeLandInsert(Arena arena, Addr base, Addr limit);
|
||||
extern void ArenaFreeLandDelete(Arena arena, Addr base, Addr limit);
|
||||
extern void ArenaDenounce(Arena arena);
|
||||
|
||||
extern Bool GlobalsCheck(Globals arena);
|
||||
extern Res GlobalsInit(Globals arena);
|
||||
|
|
|
|||
|
|
@ -637,21 +637,17 @@ void ArenaPostmortem(Globals globals)
|
|||
LockReleaseRecursive(globals->lock);
|
||||
}
|
||||
|
||||
/* Acquire the lock again so that we can call ArenaDenounce. */
|
||||
ArenaEnter(arena);
|
||||
|
||||
/* Remove the arena from the global arena ring so that it no longer
|
||||
* handles protection faults. */
|
||||
ArenaDenounce(arena);
|
||||
* handles protection faults. (Don't call arenaDenounce because that
|
||||
* needs to claim the global ring lock, but that might already be
|
||||
* held, for example if we are inside ArenaAccess.) */
|
||||
RingRemove(&globals->globalRing);
|
||||
|
||||
/* Clamp the arena so that ArenaPoll does nothing. */
|
||||
ArenaClamp(globals);
|
||||
|
||||
/* Remove all protection from mapped pages. */
|
||||
arenaExpose(arena);
|
||||
|
||||
/* Release the lock finally. */
|
||||
ArenaLeave(arena);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue