diff --git a/issues/the-kernel-is-small-interrupts-post-and-threads-wait.md b/issues/the-kernel-is-small-interrupts-post-and-threads-wait.md index f5309e3018..764d97701c 100644 --- a/issues/the-kernel-is-small-interrupts-post-and-threads-wait.md +++ b/issues/the-kernel-is-small-interrupts-post-and-threads-wait.md @@ -179,15 +179,27 @@ Beside that order, each waiting on something outside it: Each half measures the kernel's lines and its longest interrupts-off and preemption-off windows, by stage 6 step 2's rule. - 10. **usbd**, stage 5's second half: the whole xHCI moves, HID to the - keyboard claim and mass storage over `toyos-blockring`. A USB - keyboard's transitions reach the kernel only as usbd's keyboard claim. + 10. **usbd**, stage 5's second half: the whole xHCI moves, HID delivered + to the owner of input over the `input` port and mass storage over + `toyos-blockring`. A USB keyboard's transitions never reach the + kernel, whose keyboard and mouse streams go when their last kernel + source leaves (the ruling on #899, applied to usbd on #901). It + depends on stage 7 step 2 landing first, because at step 10 usbd's + is the kernel's last input source (the ruling on #904, + https://github.com/ToyOSOrg/ToyOS/pull/904#issuecomment-6139079945). Its decoders are `toyos-xhci`'s Bulk-Only and SCSI modules and `toyos-usbhid`. **Exit**: the kernel's part, usbd's claims handed over again at its death: the controller's by `usbd_drives_the_spare` on the default `qemu-xhci` (below) and - `usbd_drives_the_type_c_controller`, the keyboard's by stage 7 step - 2's kernel test on usbd's claim. usbd's, a device that stops answering + `usbd_drives_the_type_c_controller`; there is no keyboard claim. The + kernel's input streams, deleted: `keyboard.rs`, `mouse.rs` and + `input_merge_test.rs` gone from `kernel/src`, and no `Keyboard` or + `Mouse` in `sdk/abi`'s `DeviceType` or `FileType`. The + owner of input's, a key usbd held at its death released: + `toyos-input`'s test that a connection's end releases every device it + carried and a `gone` only its own `source`, red with `Merge`'s release + on a connection's end removed, and red with `gone` releasing its whole + connection. usbd's, a device that stops answering costing only itself: `toyos-xhci-sim`'s `a_controller_that_never_answers_still_releases_the_port`, `a_recovery_the_controller_refuses_lets_the_device_go` and @@ -305,19 +317,23 @@ Beside that order, each waiting on something outside it: **Partly done**: step 1. 1. **The panic console takes no input, and an `isa` claim grants a process exact ports and its ISA lines.** **Done** (#592). - 2. **ps2server**, the server over that claim, feeding the kernel's keyboard - and mouse streams so the merge with USB HID stays where it is; the + 2. **ps2server**, the server over that claim, delivering to the owner + of input over the `input` port, where userland merges it with USB HID + (the ruling on #899); the kernel's merge (`HELD`, `merged_buttons`, + `SOURCE_EXISTS`) is deleted, and its streams carry its own sources' + records unmerged until usbd takes the last of them; the kernel's driver, its vector, its actuators and the - `keyboard_controller` seam deleted. A keyboard claim is refused while no - source exists, which the supervisor's order of endowment then decides. + `keyboard_controller` seam deleted. ps2server's one kernel claim is the + `isa` row; it takes no keyboard claim, and the owner reads its + transitions from its `input` acceptor's connections. **Exit**: no i8042 code in the kernel (`arch/x86_64/i8042/`, `arch/x86_64/idt/i8042.rs` and both architectures' `keyboard_controller` gone from `kernel/src`, and `toyos-ps2`, whose one kernel user is `kernel/src/arch/x86_64/i8042/mod.rs`, gone from - `kernel/Cargo.toml`); a kernel test this step owes, that a keyboard - claim whose holder dies is handed to the next claimant and the - keyboard stream delivers its transitions and none of the dead - holder's, red on a kernel that keeps the dead holder as the source; + `kernel/Cargo.toml`); a kernel test this step owes, that the `isa` + row whose holder dies is handed to the next claimant with none of the + dead holder's records pending (`isa_lines_reach_their_holder`), red + on a kernel whose release keeps the dead holder's record; and ps2server's restart mid-packet held by `toyos-ps2`'s `a_lost_scancode_byte_never_wedges_the_prefix_state` and `a_stream_truncated_at_any_offset_resyncs_within_two_packets`.