Use a ring buffer for mail
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m30s

This commit is contained in:
2026-02-21 15:52:31 +01:00
parent 7601ea68e2
commit dc021c0469
3 changed files with 25 additions and 15 deletions

View File

@@ -2,21 +2,28 @@
#define _KERNEL_PROC_MAIL_H
#include <libk/list.h>
#include <libk/ringbuffer.h>
#include <libk/std.h>
#include <proc/suspension_q.h>
#define PROC_MAIL_MAX 1024
struct proc;
struct proc_resource;
struct cpu;
struct reschedule_ctx;
struct mail_packet {
void* packet_buffer;
size_t packet_size;
};
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;
struct ringbuffer ringbuffer;
};
void proc_cleanup_resource_mail (struct proc_resource* resource, struct reschedule_ctx* rctx);