feat(ipc): saved replies: SaveReply/ReplySaved (8 per thread, released on thread death, unforgeable); terminal READ saved until Enter (line.rs editor, reader queue), now pinged

This commit is contained in:
2026-10-28 02:09:34 +01:00
parent 3d69c10079
commit d04dcfffa1
19 changed files with 588 additions and 94 deletions

View File

@@ -4,6 +4,7 @@
extern crate alloc;
pub mod grid;
pub mod line;
pub mod server;
#[cfg(test)]
@@ -77,15 +78,6 @@ impl server::Console for Screen {
let _ = syscall::set_timer(self.timer, types::time::Ticks::from_raw(at));
}
fn next_key(&mut self) -> u8 {
loop {
if let Some(key) = self.poll_key() {
return key;
}
let _ = syscall::wait(self.notify);
}
}
fn poll_key(&mut self) -> Option<u8> {
while let Some(event) = display::poll_input(DISPLAY) {
if let Some(key) = byte(event) {
@@ -95,6 +87,14 @@ impl server::Console for Screen {
None
}
fn save_reply(&mut self) -> Option<types::bounded::SavedReply> {
syscall::save_reply().ok()
}
fn answer(&mut self, reply: types::bounded::SavedReply, words: [usize; 4]) {
let _ = syscall::reply_saved(reply, words, None);
}
fn take_focus(&mut self) {
display::subscribe(DISPLAY, self.notify, Badge::new(KEYS_BIT));
display::clear(DISPLAY, BG);