Let the user application decide upon the resource ID (RID)
All checks were successful
Build documentation / build-and-deploy (push) Successful in 22s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 22s
This commit is contained in:
@@ -42,10 +42,9 @@ struct proc* proc_from_elf (uint8_t* elf_contents) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int kstk_rid = atomic_fetch_add (&proc->rids, 1);
|
||||
struct proc_resource_mem_init kstk_mem_init = {.pages = KSTACK_SIZE / PAGE_SIZE};
|
||||
struct proc_resource* kstk_r =
|
||||
proc_create_resource (proc, kstk_rid, PR_MEM, RV_PRIVATE, (void*)&kstk_mem_init);
|
||||
proc_create_resource (proc, 0, PR_MEM, RV_PRIVATE, (void*)&kstk_mem_init);
|
||||
if (kstk_r == NULL) {
|
||||
pmm_free (proc->pd->cr3_paddr, 1);
|
||||
free (proc->pd);
|
||||
@@ -55,10 +54,9 @@ struct proc* proc_from_elf (uint8_t* elf_contents) {
|
||||
|
||||
proc->pdata.kernel_stack = kstk_r->u.mem.paddr + (uintptr_t)hhdm->offset + KSTACK_SIZE;
|
||||
|
||||
int ustk_rid = atomic_fetch_add (&proc->rids, 1);
|
||||
struct proc_resource_mem_init ustk_mem_init = {.pages = USTACK_SIZE / PAGE_SIZE};
|
||||
struct proc_resource* ustk_r =
|
||||
proc_create_resource (proc, ustk_rid, PR_MEM, RV_PRIVATE, (void*)&ustk_mem_init);
|
||||
proc_create_resource (proc, 1, PR_MEM, RV_PRIVATE, (void*)&ustk_mem_init);
|
||||
if (ustk_r == NULL) {
|
||||
kstk_r->ops.cleanup (proc, kstk_r);
|
||||
free (kstk_r);
|
||||
|
||||
Reference in New Issue
Block a user