The program console
The console (property 19): a program that has a terminal. The person types expressions of a small language. A command is a function with typed parameters and a typed result; it is not a separate program, and it does not parse text.
The console has no surface. It writes records to its terminal, and reads the keys of the person from it (support/terminal). It owns the line that the person edits, with a caret inside it (support/line_editor), the history of the lines, and the completion list (completion.odin): the terminal draws them.
The console has two threads. The first thread reads the keys. The second thread runs the lines. During a line, the first thread keeps the keys that the person types, shows the time of the line, and stops an isolated call when the person presses Escape.
| Fact | Value |
|---|---|
| Source | programs/console |
| Boot image | in the boot image; the image is not built, so its size is not known |
| Imports | none |
| Imported by | none |
Exports
| Export | What it does |
|---|---|
| entry() |
Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | {.Root_Ring, .Inspect, .Stop, .Image, .Terminal, .Store, .Person, .Replacements, .Replace, .History_Store} | |
| Budget: pages, programs, threads | {pages = 8192, programs = 5, threads = 6} | 4 sandboxes. |
Read from grants_of and things_of in programs/root/main.odin; budget_of in the same file adds the limits of processor time and of log records.
