mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 02:41:35 +03:00
1. single-homes Arvo in worker process
This commit is contained in:
parent
aa05514625
commit
21edd20050
@ -25,7 +25,8 @@
|
||||
u3_noun wen; // current time, as text
|
||||
u3_noun sev_l; // instance number
|
||||
u3_noun sen; // instance string
|
||||
u3_noun own; // owner list
|
||||
u3_noun our; // identity
|
||||
u3_noun fak; // c3y is fake
|
||||
|
||||
u3_noun sac; // space profiling
|
||||
|
||||
|
@ -1679,6 +1679,7 @@ u3m_boot_new(c3_c* dir_c)
|
||||
/* Basic initialization.
|
||||
*/
|
||||
memset(u3A, 0, sizeof(*u3A));
|
||||
u3A->our = u3_none;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1708,6 +1709,7 @@ u3m_boot_pier(void)
|
||||
/* Basic initialization.
|
||||
*/
|
||||
memset(u3A, 0, sizeof(*u3A));
|
||||
u3A->our = u3_none;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -614,7 +614,8 @@ u3v_mark(void)
|
||||
tot_w += u3a_mark_noun(arv_u->now);
|
||||
tot_w += u3a_mark_noun(arv_u->wen);
|
||||
tot_w += u3a_mark_noun(arv_u->sen);
|
||||
tot_w += u3a_mark_noun(arv_u->own);
|
||||
tot_w += u3a_mark_noun(arv_u->our);
|
||||
tot_w += u3a_mark_noun(arv_u->fak);
|
||||
|
||||
tot_w += u3a_mark_noun(arv_u->roe);
|
||||
tot_w += u3a_mark_noun(arv_u->key);
|
||||
|
19
vere/reck.c
19
vere/reck.c
@ -111,13 +111,10 @@ _reck_kick_term(u3_pier* pir_u, u3_noun pox, c3_l tid_l, u3_noun fav)
|
||||
|
||||
case c3__init: p_fav = u3t(fav);
|
||||
{
|
||||
u3A->own = u3nc(u3k(p_fav), u3A->own);
|
||||
|
||||
u3_noun hox = u3dc("scot", 'p', u3k(p_fav));
|
||||
c3_c* nam_c = u3r_string(hox);
|
||||
|
||||
// uL(fprintf(uH, "kick: init: %s\n", nam_c));
|
||||
free(nam_c); u3z(pox); u3z(hox); u3z(fav); return c3y;
|
||||
// king ignores %init
|
||||
// u3A->own = u3nc(u3k(p_fav), u3A->own);
|
||||
// uL(fprintf(uH, "kick: init: %d\n", p_fav));
|
||||
u3z(pox); u3z(fav); return c3y;
|
||||
} break;
|
||||
|
||||
case c3__mass: p_fav = u3t(fav);
|
||||
@ -226,8 +223,8 @@ _reck_kick_ames(u3_pier* pir_u, u3_noun pox, u3_noun fav)
|
||||
default: break;
|
||||
case c3__init: p_fav = u3t(fav);
|
||||
{
|
||||
u3A->own = u3nc(u3k(p_fav), u3A->own);
|
||||
|
||||
// king ignores %init
|
||||
// u3A->own = u3nc(u3k(p_fav), u3A->own);
|
||||
// uL(fprintf(uH, "kick: init: %d\n", p_fav));
|
||||
u3z(pox); u3z(fav); return c3y;
|
||||
} break;
|
||||
@ -315,8 +312,8 @@ _reck_kick_spec(u3_pier* pir_u, u3_noun pox, u3_noun fav)
|
||||
|
||||
case c3__init: p_fav = u3t(fav);
|
||||
{
|
||||
u3A->own = u3nc(u3k(p_fav), u3A->own);
|
||||
|
||||
// king ignores %init
|
||||
// u3A->own = u3nc(u3k(p_fav), u3A->own);
|
||||
// uL(fprintf(uH, "kick: init: %d\n", p_fav));
|
||||
u3z(pox); u3z(fav); return c3y;
|
||||
} break;
|
||||
|
27
vere/serf.c
27
vere/serf.c
@ -208,6 +208,33 @@ _serf_poke_live(c3_d evt_d, // event number
|
||||
u3_noun vir = u3k(u3h(u3t(gon)));
|
||||
u3_noun cor = u3k(u3t(u3t(gon)));
|
||||
|
||||
// single-home
|
||||
//
|
||||
// XX revise when real keys are supported
|
||||
// XX dispatch on evt_d, wire, or card tag?
|
||||
//
|
||||
if ( 6ULL == evt_d ) {
|
||||
// vir=[[wire %veal @p] ~]
|
||||
// fec=[%veal @p]
|
||||
//
|
||||
u3_noun fec = u3t(u3h(vir));
|
||||
|
||||
c3_assert( c3__veal == u3h(fec) );
|
||||
c3_assert( u3_none == u3A->our );
|
||||
|
||||
u3A->our = u3k(u3t(fec));
|
||||
u3A->fak = c3y;
|
||||
|
||||
{
|
||||
u3_noun nam = u3dc("scot", 'p', u3k(u3A->our));
|
||||
c3_c* nam_c = u3r_string(nam);
|
||||
fprintf(stderr, "boot: ship: %s%s\r\n", nam_c,
|
||||
(c3y == u3A->fak) ? " (fake)" : "");
|
||||
free(nam_c);
|
||||
u3z(nam);
|
||||
}
|
||||
}
|
||||
|
||||
_serf_sure(ovo, vir, cor);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user