1
0
mirror of https://github.com/ilyakooo0/urbit.git synced 2024-12-27 17:02:32 +03:00
urbit/include/noun/vortex.h

176 lines
4.2 KiB
C
Raw Normal View History

2014-09-23 21:11:59 +04:00
/* include/g/v.h
**
** This file is in the public domain.
*/
/** Data structures.
2014-09-23 21:11:59 +04:00
**/
/* u3_cart: ovum carton.
*/
2014-11-06 03:20:01 +03:00
struct _u3v_arvo;
2014-11-06 03:20:01 +03:00
typedef struct _u3v_cart {
2014-11-26 02:31:35 +03:00
u3_noun vir; // effects of ovum
c3_o did; // cart considered for commit?
c3_o cit; // cart committed?
c3_d ent_d; // event number
2014-11-06 03:20:01 +03:00
u3p(struct _u3v_cart) nex_p;
} u3v_cart;
2014-11-06 03:20:01 +03:00
/* u3v_arvo: modern arvo structure.
*/
2014-11-06 03:20:01 +03:00
typedef struct _u3v_arvo {
c3_d ent_d; // event number
u3_noun yot; // cached gates
u3_noun now; // current time, as noun
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 sac; // space profiling
u3_noun roe; // temporary unsaved events
u3_noun key; // log key, or 0
u3_noun ken; // kernel formula
u3_noun roc; // kernel core
struct { // ova waiting to process
2014-11-26 02:31:35 +03:00
u3p(u3v_cart) egg_p; // exit of ovum queue
u3p(u3v_cart) geg_p; // entry of ovum queue
} ova;
2014-11-06 03:20:01 +03:00
} u3v_arvo;
2014-11-06 03:20:01 +03:00
/* u3v_home: all internal (within image) state.
*/
2014-11-06 03:20:01 +03:00
typedef struct _u3v_home {
u3a_road rod_u; // storage state
u3v_arvo arv_u; // arvo state
} u3v_home;
/** Globals.
**/
/* u3_Home / u3H: root of thread.
*/
2014-11-08 01:54:59 +03:00
c3_global u3v_home* u3v_Home;
# define u3H u3v_Home
# define u3A (&(u3v_Home->arv_u))
2014-09-23 21:11:59 +04:00
/** Functions.
2014-09-23 21:11:59 +04:00
**/
2014-11-06 03:20:01 +03:00
/* u3v_do(): use a kernel function.
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_do(const c3_c* txt_c, u3_noun arg);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_make(): make a new pier by loading a pill.
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_make(c3_c* pas_c);
2014-09-24 11:38:37 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_jack(): execute kernel formula to bind jets.
2014-09-24 11:38:37 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_jack(void);
2014-09-24 11:38:37 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_start(): start time.
2014-09-24 11:38:37 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_start(u3_noun now);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_arm(): load a kernel arm.
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_arm(const c3_c* txt_c);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_pike(): poke with floating core.
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_pike(u3_noun ovo, u3_noun cor);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_nick(): transform enveloped packets, [vir cor].
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_nick(u3_noun vir, u3_noun cor);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_do(): use a kernel function.
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_do(const c3_c* txt_c, u3_noun arg);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_wish(): text expression with cache.
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_wish(const c3_c* str_c);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_numb(): set the instance number.
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_numb(void);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_time(): set the reck time.
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_time(u3_noun now);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_peek(): query the reck namespace.
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_peek(u3_noun hap);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_keep(): measure timer.
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_keep(u3_noun hap);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_poke(): insert and apply an input ovum (protected).
2014-09-23 21:11:59 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3v_poke(u3_noun ovo);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_http_request(): hear http request on channel (unprotected).
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 06:10:22 +03:00
u3v_http_request(c3_o sec, u3_noun pox, u3_noun req);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_tank(): dump single tank.
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_tank(u3_noun blu, c3_l tab_l, u3_noun tac);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_punt(): dump tank list.
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_punt(u3_noun blu, c3_l tab_l, u3_noun tac);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_sway(): print trace.
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_sway(u3_noun blu, c3_l tab_l, u3_noun tax);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_plan(): queue ovum (external).
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_plan(u3_noun pax, u3_noun fav);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_plow(): queue multiple ova (external).
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_plow(u3_noun ova);
2014-09-23 21:11:59 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_hose(): clear initial ovum queue.
2014-11-01 01:36:01 +03:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_hose(void);
2014-11-01 01:36:01 +03:00
2014-11-06 03:20:01 +03:00
/* u3v_louse(): last-minute deviltry upon a bail.
2014-09-23 21:11:59 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3v_louse(c3_m how_m);
2014-10-09 06:20:57 +04:00
2014-11-06 03:20:01 +03:00
/* u3v_mark(): mark arvo kernel.
2014-10-09 06:20:57 +04:00
*/
2015-05-08 02:16:54 +03:00
c3_w
2014-11-06 03:20:01 +03:00
u3v_mark(void);