feat(v4.0.0): a line from the console breaks a wait
Text for a node from its console, arriving while the node waits for an answer (AWAIT), is kept as any message is; the wait ends in error 21, Interrupted; and the text is then done as usual. Console text for another node, passing through a node that is waiting, does not end its wait. On the hosted program 5 AWAIT ended the program with "the node stopped". The boot now reports that the line is waiting, the host reads the next line and hands it over, which breaks the wait, and then has the kept line done. The bare-metal host does the same; it is booted in the commit that follows. test_host_mesh.c: 76 checks, both widths and the sanitizers. hosted-check types 5 AWAIT and two more lines: Interrupted, then 3 and 56. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9efe8aad3a
commit
cbe1cd5e44
@@ -77,8 +77,18 @@ int v4_boot_run(const v4_boot *b);
|
||||
#define V4_BOOT_LINE_TOO_LONG (-1) /* more than the node's input buffer holds; nothing was run */
|
||||
#define V4_BOOT_LINE_STOPPED (-2) /* the node stopped on a fault, or never finished */
|
||||
#define V4_BOOT_LINE_NO_INPUT (-3) /* the line read the keyboard and there is no more input */
|
||||
#define V4_BOOT_LINE_WAITING (-4) /* the line is waiting for an answer (AWAIT) that no one here can send: see below */
|
||||
int v4_boot_line(const v4_boot *b, const char *text, unsigned len);
|
||||
|
||||
/* A LINE THAT WAITS (docs/v4.0.0/MESH.md 7b.6). V4_BOOT_LINE_WAITING means
|
||||
* the line has not ended: the node is waiting at its ports for an answer,
|
||||
* and here there is no one but the console to end that. The host reads the
|
||||
* next line and hands it over as usual: that breaks the wait, and what is
|
||||
* returned is how the line that was waiting ended -- in an error,
|
||||
* Interrupted. The node has kept the line just handed over; the host then
|
||||
* calls v4_boot_line with no text (0, 0) to have it done, and that returns
|
||||
* how it ended, which may be V4_BOOT_LINE_WAITING again. */
|
||||
|
||||
/* The dictionary hash of a node started from `im`. */
|
||||
uint64_t v4_boot_dict_hash(const v4_node *n, const v4_image *im);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user