Redesign linked list
All checks were successful
Build documentation / build-and-deploy (push) Successful in 49s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 49s
This commit is contained in:
@@ -63,12 +63,15 @@ struct proc* proc_from_elf (uint8_t* elf_contents) {
|
||||
void proc_cleanup (struct proc* proc) {
|
||||
struct limine_hhdm_response* hhdm = limine_hhdm_request.response;
|
||||
|
||||
struct proc_mapping *mapping, *mapping_tmp;
|
||||
struct list_node_link *mapping_link, *mapping_link_tmp;
|
||||
spin_lock (&proc->pd.lock);
|
||||
|
||||
linklist_foreach (proc->mappings, mapping, mapping_tmp) {
|
||||
list_foreach (proc->mappings, mapping_link, mapping_link_tmp) {
|
||||
struct proc_mapping* mapping =
|
||||
list_entry (mapping_link, struct proc_mapping, proc_mappings_link);
|
||||
|
||||
pmm_free (mapping->paddr, mapping->size / PAGE_SIZE);
|
||||
linklist_remove (struct proc_mapping*, proc->mappings, mapping);
|
||||
list_remove (proc->mappings, mapping_link);
|
||||
free (mapping);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user