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

26
kernel/proc/mail.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef _KERNEL_PROC_MAIL_H
#define _KERNEL_PROC_MAIL_H
#include <libk/std.h>
#include <proc/suspension_q.h>
struct proc;
struct proc_resource;
struct cpu;
struct proc_mail {
struct proc_resource* resource;
struct proc_suspension_q send_sq;
struct proc_suspension_q recv_sq;
void* pending_mesg;
size_t pending_mesg_size;
};
bool proc_cleanup_resource_mail (struct proc_resource* resource, struct cpu** reschedule_cpu);
bool proc_mail_send (struct proc* proc, struct proc_mail* mail, struct cpu** reschedule_cpu,
void* data, size_t data_size);
bool proc_mail_receive (struct proc* proc, struct proc_mail* mail, struct cpu** reschedule_cpu,
void* recv_buffer, size_t recv_size);
#endif // _KERNEL_PROC_MAIL_H