[kernel] Give processes and threads self handles

It was not consistent how processes got handles to themselves or their
threads, ending up with double entries. Now make such handles automatic
and expose them with new self_handle() methods.
This commit is contained in:
Justin C. Miller
2021-01-06 23:14:39 -08:00
parent 8b3356e9d8
commit e08e00790f
6 changed files with 18 additions and 4 deletions

View File

@@ -68,6 +68,9 @@ public:
/// \returns True if this thread ending has ended the process
bool thread_exited(thread *th);
/// Get the handle for this process to refer to itself
inline j6_handle_t self_handle() const { return 0; }
/// Get the process object that owns kernel threads and the
/// kernel address space
static process & kernel_process();