u3: fixes compile-time conditionals around guard page impl
@@ -840,6 +840,7 @@ _ce_loom_protect_north(c3_w pgs_w, c3_w old_w)
c3_assert(0);
}
+#ifdef U3_GUARD_PAGE
// protect guard page if clobbered
//
// NB: < pgs_w is precluded by assertion in _ce_patch_compose()
@@ -852,6 +853,7 @@ _ce_loom_protect_north(c3_w pgs_w, c3_w old_w)
c3_assert(0);
}
}
+#endif
_ce_loom_track_north(pgs_w, dif_w);
}
@@ -888,6 +890,7 @@ _ce_loom_protect_south(c3_w pgs_w, c3_w old_w)
c3_assert(0);
}
+#ifdef U3_GUARD_PAGE
// protect guard page if clobbered
//
// NB: > pgs_w is precluded by assertion in _ce_patch_compose()
@@ -900,6 +903,7 @@ _ce_loom_protect_south(c3_w pgs_w, c3_w old_w)
c3_assert(0);
}
}
+#endif
_ce_loom_track_south(pgs_w, dif_w);
}
@@ -949,6 +953,7 @@ _ce_loom_mapf_north(c3_i fid_i, c3_w pgs_w, c3_w old_w)
c3_assert(0);
}
+#ifdef U3_GUARD_PAGE
// protect guard page if clobbered
//
// NB: < pgs_w is precluded by assertion in _ce_patch_compose()
@@ -961,6 +966,7 @@ _ce_loom_mapf_north(c3_i fid_i, c3_w pgs_w, c3_w old_w)
c3_assert(0);
}
}
+#endif
_ce_loom_track_north(pgs_w, dif_w);
}
@@ -1369,11 +1375,13 @@ u3e_yolo(void)
return c3n;
}
+#ifdef U3_GUARD_PAGE
if ( 0 != mprotect(u3a_into(gar_pag_p), pag_siz_i, PROT_NONE) ) {
fprintf(stderr, "loom: failed to protect guard page: %s\r\n",
strerror(errno));
c3_assert(0);
}
+#endif
// mark all pages dirty
//
