Implement streams IPC mechanism
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m47s

This commit is contained in:
2026-03-18 22:27:56 +01:00
parent 77ab25bcee
commit 80a728f04b
22 changed files with 311 additions and 50 deletions

View File

@@ -14,6 +14,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <streams.h>
#include <string.h>
#include <system.h>
#include <tcursor.h>
@@ -231,10 +232,15 @@ void edit_start (const char* volume, const char* file_path, const char* text, si
(int)(editor.cursor.line - editor.row_offset) + 1,
(int)(editor.cursor.col - editor.col_offset) + 1 + (int)gutter_width);
mail_send (process_get_exec_pgid (), backbuffer, bbptr - backbuffer);
stream_write (process_get_pgid (), STREAM_OUT, backbuffer, bbptr - backbuffer);
uint8_t ch = 0;
mail_receive (&ch, 1);
for (;;) {
if (stream_read (process_get_pgid (), STREAM_IN, &ch, 1) > 0)
break;
else
sched ();
}
switch (ch) {
case '\b':