u3: adds facade for u3e_ward(), refactors watermarks

This commit is contained in:
Joe Bryan 2022-12-12 23:28:33 -05:00
parent 973cea6d91
commit ebf0ab49af
3 changed files with 17 additions and 3 deletions

View File

@ -44,6 +44,11 @@
void
u3m_save(void);
/* u3m_ward(): tend the guard page.
*/
void
u3m_ward(void);
/* u3m_init(): start the environment.
*/
void

View File

@ -1382,7 +1382,7 @@ void
u3e_ward(u3_post low_p, u3_post hig_p)
{
#ifdef U3_GUARD_PAGE
c3_w nop_w = (low_p - 1) >> u3a_page;
c3_w nop_w = low_p >> u3a_page;
c3_w sop_w = hig_p >> u3a_page;
c3_w pag_w = u3P.gar_w;

View File

@ -814,7 +814,6 @@ u3m_leap(c3_w pad_w)
u3R->cap_p -= len_w;
rod_u = _pave_south(u3a_into(bot_p), c3_wiseof(u3a_road), len_w);
u3e_ward(rod_u->cap_p, rod_u->hat_p);
#if 0
fprintf(stderr, "leap: from north %p (cap 0x%x), to south %p\r\n",
u3R,
@ -827,7 +826,6 @@ u3m_leap(c3_w pad_w)
u3R->cap_p += len_w;
rod_u = _pave_north(u3a_into(bot_p), c3_wiseof(u3a_road), len_w);
u3e_ward(rod_u->hat_p, rod_u->cap_p);
#if 0
fprintf(stderr, "leap: from south %p (cap 0x%x), to north %p\r\n",
u3R,
@ -849,6 +847,7 @@ u3m_leap(c3_w pad_w)
*/
{
u3R = rod_u;
u3m_ward();
_pave_parts();
}
#ifdef U3_MEMORY_DEBUG
@ -1761,6 +1760,16 @@ u3m_save(void)
return u3e_save(low_p, hig_p);
}
/* u3m_ward(): tend the guard page.
*/
void
u3m_ward(void)
{
u3_post low_p, hig_p;
u3m_water(&low_p, &hig_p);
return u3e_ward(low_p, hig_p);
}
/* _cm_signals(): set up interrupts, etc.
*/
static void