1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 06:00:41 -08:00

Improving shieldflushentries to allow for delayed protection changes on shieldlower.

Copied from Perforce
 Change: 190363
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Brooksby 2016-03-23 19:03:00 +00:00
parent f3b8479322
commit eb1d39c425

View file

@ -226,8 +226,8 @@ static void shieldSync(Shield shield, Seg seg)
SHIELD_AVERT_CRITICAL(Seg, seg);
if (!SegIsSynced(seg)) {
ProtSet(SegBase(seg), SegLimit(seg), SegSM(seg));
shieldSetPM(shield, seg, SegSM(seg));
ProtSet(SegBase(seg), SegLimit(seg), SegPM(seg));
}
}
@ -418,8 +418,7 @@ static void shieldFlushEntries(Shield shield)
if (!SegIsSynced(seg)) {
shieldSetPM(shield, seg, SegSM(seg));
if (SegSM(seg) != mode || SegBase(seg) != limit) {
if (mode != AccessSetEMPTY) {
AVER(base != NULL);
if (base != NULL) {
AVER(base < limit);
ProtSet(base, limit, mode);
}
@ -429,9 +428,8 @@ static void shieldFlushEntries(Shield shield)
limit = SegLimit(seg);
}
}
if (mode != AccessSetEMPTY) {
AVER(base != NULL);
AVER(limit != NULL);
if (base != NULL) {
AVER(base < limit);
ProtSet(base, limit, mode);
}
@ -580,6 +578,7 @@ void (ShieldLower)(Arena arena, Seg seg, AccessSet mode)
/* TODO: Do we need to promptly call shieldProtLower here? It
loses the opportunity to coalesce the protection call. It would
violate design.mps.shield.prop.inside.access. */
/* shieldQueue(arena, seg); */
shieldProtLower(shield, seg, mode);
/* Check queue and segment consistency. */