vm: replace vm-region with address-space
address-space is a non-recursive data structure, which contains a flat list of vm_areas representing mapped vm-objects. userspace programs can no longer create sub-address-spaces. instead, they can reserve portions of the address space, and use that reserved space to create mappings.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#include <kernel/address-space.h>
|
||||
#include <kernel/machine/cpu.h>
|
||||
#include <kernel/printk.h>
|
||||
#include <kernel/sched.h>
|
||||
#include <kernel/syscall.h>
|
||||
#include <kernel/task.h>
|
||||
#include <kernel/thread.h>
|
||||
#include <kernel/vm-region.h>
|
||||
|
||||
extern kern_status_t sys_task_exit(int status)
|
||||
{
|
||||
@@ -128,10 +128,10 @@ kern_status_t sys_task_create(
|
||||
task_unlock_irqrestore(parent, flags);
|
||||
|
||||
child_handle_slot->h_object = &child->t_base;
|
||||
space_handle_slot->h_object = &child->t_address_space->vr_base;
|
||||
space_handle_slot->h_object = &child->t_address_space->s_base;
|
||||
|
||||
object_add_handle(&child->t_base);
|
||||
object_add_handle(&child->t_address_space->vr_base);
|
||||
object_add_handle(&child->t_address_space->s_base);
|
||||
|
||||
object_unref(parent_obj);
|
||||
|
||||
@@ -252,8 +252,8 @@ kern_status_t sys_task_get_address_space(
|
||||
return KERN_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
handle_slot->h_object = &task->t_address_space->vr_base;
|
||||
object_add_handle(&task->t_address_space->vr_base);
|
||||
handle_slot->h_object = &task->t_address_space->s_base;
|
||||
object_add_handle(&task->t_address_space->s_base);
|
||||
task_unlock_irqrestore(self, flags);
|
||||
object_unref(task_obj);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user