Message passing / mail system
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m20s

This commit is contained in:
2026-02-18 17:18:03 +01:00
parent 35454a087e
commit ae0a6024da
19 changed files with 340 additions and 66 deletions

View File

@@ -1,5 +1,6 @@
include ../make/ufuncs.mk
$(eval $(call add_lib,libstring))
$(eval $(call add_lib,libprocess))
include ../make/user.mk

14
ce/ce.c
View File

@@ -1,4 +1,14 @@
#include <m/system.h>
#include <process.h>
#include <string.h>
void app_main (void) {}
void app_main (void) {
int e_pid = get_exec_pid ();
int e_pgid = get_procgroup (e_pid);
for (;;) {
char ch;
mail_receive (&ch, 1);
mail_send (e_pgid, &ch, 1);
}
}