Use a ring buffer for mail
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m30s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m30s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user