Clean up IOAPIC and LAPIC implementations
All checks were successful
Build documentation / build-and-deploy (push) Successful in 33s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 33s
This commit is contained in:
@@ -26,6 +26,8 @@ void proc_cleanup_resources (struct proc* proc) {
|
||||
}
|
||||
|
||||
void proc_drop_resource (struct proc* proc, struct proc_resource* resource) {
|
||||
DEBUG ("resource=%p, type=%d, rid=%d\n", resource, resource->type, resource->rid);
|
||||
|
||||
if (atomic_fetch_sub (&resource->refs, 1) == 1) {
|
||||
spin_lock (&proc->lock);
|
||||
rbtree_delete (&proc->resource_tree, &resource->proc_resource_tree_link);
|
||||
@@ -47,7 +49,6 @@ static bool proc_create_resource_mem (struct proc_resource_mem* mem,
|
||||
|
||||
mem->paddr = paddr;
|
||||
mem->pages = init->pages;
|
||||
DEBUG ("paddr=%p, pages=%zu\n", mem->paddr, mem->pages);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -82,6 +83,8 @@ struct proc_resource* proc_create_resource (struct proc* proc, int rid, int type
|
||||
struct proc_resource_mem_init* mem_init = data;
|
||||
proc_create_resource_mem (&resource->u.mem, mem_init);
|
||||
resource->ops.cleanup = &proc_cleanup_resource_mem;
|
||||
DEBUG ("resource=%p paddr=%p, pages=%zu\n", resource, resource->u.mem.paddr,
|
||||
resource->u.mem.pages);
|
||||
} break;
|
||||
default: {
|
||||
free (resource);
|
||||
|
||||
Reference in New Issue
Block a user