[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:
@@ -3,18 +3,25 @@
|
||||
/// Types used in process and thread initialization
|
||||
|
||||
#include <stdint.h>
|
||||
#include "j6/types.h"
|
||||
|
||||
enum j6_init_type { // `value` is a:
|
||||
j6_init_handle_system, // Handle to the system
|
||||
j6_init_handle_process, // Handle to this process
|
||||
j6_init_handle_thread, // Handle to this thread
|
||||
j6_init_handle_space, // Handle to this process' address space
|
||||
j6_init_handle_self, // Handle to the system
|
||||
j6_init_handle_other, // Handle to this process
|
||||
j6_init_desc_framebuffer // Pointer to a j6_init_framebuffer descriptor
|
||||
};
|
||||
|
||||
struct j6_typed_handle {
|
||||
enum j6_object_type type;
|
||||
j6_handle_t handle;
|
||||
};
|
||||
|
||||
struct j6_init_value {
|
||||
enum j6_init_type type;
|
||||
uint64_t value;
|
||||
union {
|
||||
struct j6_typed_handle handle;
|
||||
void *data;
|
||||
};
|
||||
};
|
||||
|
||||
/// Structure defining a framebuffer.
|
||||
|
||||
Reference in New Issue
Block a user