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

@@ -69,6 +69,11 @@ struct proc_resource* proc_create_resource_mail (struct procgroup* procgroup, in
resource->rid = rid;
resource->type = PR_MAIL;
if (!ringbuffer_init (&resource->u.mail.ringbuffer, PROC_MAIL_MAX, sizeof (struct mail_packet))) {
free (resource);
return NULL;
}
spin_lock (&procgroup->lock);
rbtree_insert (struct proc_resource, &procgroup->resource_tree, &resource->resource_tree_link,
resource_tree_link, rid);