shrub/include/noun/manage.h

120 lines
3.0 KiB
C
Raw Normal View History

2014-11-08 01:54:59 +03:00
/* i/n/m.h
2014-09-04 07:44:53 +04:00
**
** This file is in the public domain.
*/
/** System management.
**/
2014-11-16 04:10:15 +03:00
/* u3m_boot(): start the u3 system.
2014-09-04 07:44:53 +04:00
*/
void
2014-11-16 04:10:15 +03:00
u3m_boot(c3_o nuu_o, c3_o bug_o, c3_c* dir_c);
2014-10-06 21:17:33 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_bail(): bail out. Does not return.
2014-09-04 07:44:53 +04:00
**
** Bail motes:
**
** %exit :: semantic failure
** %evil :: bad crypto
** %intr :: interrupt
** %fail :: execution failure
** %foul :: assert failure
** %need :: network block
** %meme :: out of memory
2014-11-16 04:10:15 +03:00
** %time :: timed out
** %oops :: assertion failure
2014-09-04 07:44:53 +04:00
*/
c3_i
2015-02-23 03:11:46 +03:00
u3m_bail(c3_m how_m) __attribute__((noreturn));
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_file(): load file, as atom, or bail.
*/
2014-09-10 20:45:39 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3m_file(c3_c* pas_c);
2014-11-06 03:20:01 +03:00
/* u3m_error(): bail out with %exit, ct_pushing error.
2014-09-04 07:44:53 +04:00
*/
c3_i
2014-11-06 03:20:01 +03:00
u3m_error(c3_c* str_c);
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_hate(): new, integrated leap mechanism (enter).
2014-10-31 00:40:05 +03:00
*/
void
2014-11-06 03:20:01 +03:00
u3m_hate(c3_w pad_w);
2014-10-31 00:40:05 +03:00
2014-11-06 03:20:01 +03:00
/* u3m_love(): return product from leap.
2014-10-31 00:40:05 +03:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3m_love(u3_noun pro);
2014-10-31 00:40:05 +03:00
2014-11-06 03:20:01 +03:00
/* u3m_soft(): system soft wrapper. unifies unix and nock errors.
**
** Produces [%$ result] or [%error (list tank)].
*/
2014-09-10 20:45:39 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3m_soft(c3_w sec_w, u3_funk fun_f, u3_noun arg);
2014-11-16 04:10:15 +03:00
/* u3m_soft_slam: top-level call.
2014-10-01 10:34:30 +04:00
*/
u3_noun
2014-11-16 04:10:15 +03:00
u3m_soft_slam(u3_noun gat, u3_noun sam);
2014-10-01 10:34:30 +04:00
2014-11-16 04:10:15 +03:00
/* u3m_soft_nock: top-level nock.
2014-11-02 01:13:18 +03:00
*/
u3_noun
2014-11-16 04:10:15 +03:00
u3m_soft_nock(u3_noun bus, u3_noun fol);
2014-11-02 01:13:18 +03:00
2014-11-06 03:20:01 +03:00
/* u3m_soft_sure(): top-level call assumed correct.
2014-11-02 01:13:18 +03:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3m_soft_sure(u3_funk fun_f, u3_noun arg);
2014-11-02 01:13:18 +03:00
2014-11-06 03:20:01 +03:00
/* u3m_soft_run(): descend into virtualization context.
2014-10-01 10:34:30 +04:00
*/
u3_noun
2014-11-06 03:20:01 +03:00
u3m_soft_run(u3_noun fly,
2016-02-02 22:52:10 +03:00
u3_noun sea,
2016-02-04 00:33:43 +03:00
u3_noun gul,
2014-11-16 04:10:15 +03:00
u3_funq fun_f,
u3_noun aga,
u3_noun agb);
2014-10-01 10:34:30 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_soft_esc(): namespace lookup to (unit ,*).
2014-10-01 10:34:30 +04:00
*/
u3_noun
2016-02-02 22:52:10 +03:00
u3m_soft_esc(u3_noun ref, u3_noun sam);
2014-10-01 10:34:30 +04:00
2015-05-08 02:16:54 +03:00
/* u3m_mark(): mark all nouns in the road.
*/
c3_w
u3m_mark(void);
2014-11-26 02:31:35 +03:00
/* u3m_grab(): garbage-collect the world, plus extra roots.
*/
void
u3m_grab(u3_noun som, ...); // terminate with u3_none
2014-11-06 03:20:01 +03:00
/* u3m_water(): produce high and low watermarks. Asserts u3R == u3H.
2014-09-04 07:44:53 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3m_water(c3_w *low_w, c3_w *hig_w);
2014-09-12 04:41:26 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_pretty(): dumb prettyprint to string. RETAIN.
2014-09-12 04:41:26 +04:00
*/
c3_c*
2014-11-06 03:20:01 +03:00
u3m_pretty(u3_noun som);
2014-09-12 04:41:26 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_p(): dumb print with caption. RETAIN.
2014-09-12 04:41:26 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3m_p(const c3_c* cap_c, u3_noun som);
2014-09-27 04:27:35 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_tape(): dump a tape to stdout.
2014-09-27 04:27:35 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3m_tape(u3_noun tep);
2014-09-27 04:27:35 +04:00
2014-11-06 03:20:01 +03:00
/* u3m_wall(): dump a wall to stdout.
2014-09-27 04:27:35 +04:00
*/
void
2014-11-06 03:20:01 +03:00
u3m_wall(u3_noun wol);