kernel: handle: add support for allocating a specific handle value
This commit is contained in:
@@ -30,6 +30,7 @@ kern_status_t sys_task_self(kern_handle_t *out)
|
||||
kern_handle_t handle;
|
||||
kern_status_t status = handle_table_alloc_handle(
|
||||
self->t_handles,
|
||||
KERN_HANDLE_INVALID,
|
||||
&handle_slot,
|
||||
&handle);
|
||||
task_unlock_irqrestore(self, flags);
|
||||
@@ -89,6 +90,7 @@ kern_status_t sys_task_create(
|
||||
kern_handle_t child_handle, space_handle;
|
||||
status = handle_table_alloc_handle(
|
||||
self->t_handles,
|
||||
KERN_HANDLE_INVALID,
|
||||
&child_handle_slot,
|
||||
&child_handle);
|
||||
if (status != KERN_OK) {
|
||||
@@ -99,6 +101,7 @@ kern_status_t sys_task_create(
|
||||
|
||||
status = handle_table_alloc_handle(
|
||||
self->t_handles,
|
||||
KERN_HANDLE_INVALID,
|
||||
&space_handle_slot,
|
||||
&space_handle);
|
||||
if (status != KERN_OK) {
|
||||
@@ -175,6 +178,7 @@ kern_status_t sys_task_create_thread(
|
||||
kern_handle_t out_handle;
|
||||
status = handle_table_alloc_handle(
|
||||
self->t_handles,
|
||||
KERN_HANDLE_INVALID,
|
||||
&target_handle,
|
||||
&out_handle);
|
||||
if (status != KERN_OK) {
|
||||
@@ -236,6 +240,7 @@ kern_status_t sys_task_get_address_space(
|
||||
|
||||
status = handle_table_alloc_handle(
|
||||
self->t_handles,
|
||||
KERN_HANDLE_INVALID,
|
||||
&handle_slot,
|
||||
&handle);
|
||||
if (status != KERN_OK) {
|
||||
@@ -278,6 +283,7 @@ kern_status_t sys_thread_self(kern_handle_t *out)
|
||||
kern_handle_t handle;
|
||||
kern_status_t status = handle_table_alloc_handle(
|
||||
self->t_handles,
|
||||
KERN_HANDLE_INVALID,
|
||||
&handle_slot,
|
||||
&handle);
|
||||
task_unlock_irqrestore(self, flags);
|
||||
|
||||
@@ -154,6 +154,7 @@ kern_status_t sys_vm_controller_create_object(
|
||||
kern_handle_t out_handle = KERN_HANDLE_INVALID;
|
||||
status = handle_table_alloc_handle(
|
||||
self->t_handles,
|
||||
KERN_HANDLE_INVALID,
|
||||
&out_slot,
|
||||
&out_handle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user