[kernel] Have process_start syscall take a list of handles
This also prompted a change of the process initialization protocol to allow handles to get typed, and changing to marking them as just self/other handls. This also means exposing the object type enum to userspace.
This commit is contained in:
@@ -16,8 +16,18 @@ process_create(j6_handle_t *handle)
|
||||
}
|
||||
|
||||
j6_status_t
|
||||
process_start(j6_handle_t *handle, uintptr_t entrypoint)
|
||||
process_start(j6_handle_t handle, uintptr_t entrypoint, j6_handle_t *handles, size_t handle_count)
|
||||
{
|
||||
process &p = process::current();
|
||||
process *c = get_handle<process>(handle);
|
||||
if (handle_count && !handles)
|
||||
return j6_err_invalid_arg;
|
||||
|
||||
for (size_t i = 0; i < handle_count; ++i) {
|
||||
kobject *o = p.lookup_handle(handles[i]);
|
||||
if (o) c->add_handle(o);
|
||||
}
|
||||
|
||||
return j6_err_nyi;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user