mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-24 10:33:22 +03:00
u3: adds facade for u3e_ward(), refactors watermarks
This commit is contained in:
parent
973cea6d91
commit
ebf0ab49af
@ -44,6 +44,11 @@
|
||||
void
|
||||
u3m_save(void);
|
||||
|
||||
/* u3m_ward(): tend the guard page.
|
||||
*/
|
||||
void
|
||||
u3m_ward(void);
|
||||
|
||||
/* u3m_init(): start the environment.
|
||||
*/
|
||||
void
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user