mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
u3: adds u3j_stay/load to manage cold jet state
This commit is contained in:
parent
c8b36220f0
commit
0c6914f505
@ -190,6 +190,16 @@
|
||||
void
|
||||
u3j_ream(void);
|
||||
|
||||
/* u3j_stay(): extract cold state
|
||||
*/
|
||||
u3_noun
|
||||
u3j_stay(void);
|
||||
|
||||
/* u3j_load(): inject cold state
|
||||
*/
|
||||
void
|
||||
u3j_load(u3_noun rel);
|
||||
|
||||
/* u3j_reap(): promote jet state.
|
||||
*/
|
||||
void
|
||||
|
@ -2191,6 +2191,33 @@ u3j_ream(void)
|
||||
u3h_walk(u3R->jed.han_p, _cj_ream_hank);
|
||||
}
|
||||
|
||||
/* u3j_stay(): extract cold state
|
||||
*/
|
||||
u3_noun
|
||||
u3j_stay(void)
|
||||
{
|
||||
u3_noun rel = u3_nul;
|
||||
c3_assert(u3R == &(u3H->rod_u));
|
||||
u3h_walk_with(u3R->jed.cod_p, _cj_warm_tap, &rel);
|
||||
return rel;
|
||||
}
|
||||
|
||||
/* u3j_load(): inject cold state
|
||||
*/
|
||||
void
|
||||
u3j_load(u3_noun rel)
|
||||
{
|
||||
u3_noun ler = rel;
|
||||
u3_noun lor;
|
||||
|
||||
while ( u3_nul != ler ) {
|
||||
u3x_cell(ler, &lor, &ler);
|
||||
u3h_put(u3R->jed.cod_p, u3h(lor), u3k(u3t(lor)));
|
||||
}
|
||||
|
||||
u3z(rel);
|
||||
}
|
||||
|
||||
/* _cj_fink_mark(): mark a u3j_fink for gc.
|
||||
*/
|
||||
static c3_w
|
||||
|
Loading…
Reference in New Issue
Block a user