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:
parent
f3b8479322
commit
eb1d39c425
1 changed files with 5 additions and 6 deletions
|
|
@ -226,8 +226,8 @@ static void shieldSync(Shield shield, Seg seg)
|
||||||
SHIELD_AVERT_CRITICAL(Seg, seg);
|
SHIELD_AVERT_CRITICAL(Seg, seg);
|
||||||
|
|
||||||
if (!SegIsSynced(seg)) {
|
if (!SegIsSynced(seg)) {
|
||||||
ProtSet(SegBase(seg), SegLimit(seg), SegSM(seg));
|
|
||||||
shieldSetPM(shield, 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)) {
|
if (!SegIsSynced(seg)) {
|
||||||
shieldSetPM(shield, seg, SegSM(seg));
|
shieldSetPM(shield, seg, SegSM(seg));
|
||||||
if (SegSM(seg) != mode || SegBase(seg) != limit) {
|
if (SegSM(seg) != mode || SegBase(seg) != limit) {
|
||||||
if (mode != AccessSetEMPTY) {
|
if (base != NULL) {
|
||||||
AVER(base != NULL);
|
|
||||||
AVER(base < limit);
|
AVER(base < limit);
|
||||||
ProtSet(base, limit, mode);
|
ProtSet(base, limit, mode);
|
||||||
}
|
}
|
||||||
|
|
@ -429,9 +428,8 @@ static void shieldFlushEntries(Shield shield)
|
||||||
limit = SegLimit(seg);
|
limit = SegLimit(seg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mode != AccessSetEMPTY) {
|
if (base != NULL) {
|
||||||
AVER(base != NULL);
|
AVER(base < limit);
|
||||||
AVER(limit != NULL);
|
|
||||||
ProtSet(base, limit, mode);
|
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
|
/* TODO: Do we need to promptly call shieldProtLower here? It
|
||||||
loses the opportunity to coalesce the protection call. It would
|
loses the opportunity to coalesce the protection call. It would
|
||||||
violate design.mps.shield.prop.inside.access. */
|
violate design.mps.shield.prop.inside.access. */
|
||||||
|
/* shieldQueue(arena, seg); */
|
||||||
shieldProtLower(shield, seg, mode);
|
shieldProtLower(shield, seg, mode);
|
||||||
|
|
||||||
/* Check queue and segment consistency. */
|
/* Check queue and segment consistency. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue