[kernel] Remove process & thread self-handles

For the coming switch to cap/handle ref-counting being the main lifetime
determiner of objects, get rid of self handles for threads and processes
to avoid circular references. Instead, passing 0 to syscalls expecting a
thread or process handle signifies "this process/thread".
This commit is contained in:
Justin C. Miller
2023-02-19 11:23:23 -08:00
parent d2a6113fb7
commit 94b2a79f79
13 changed files with 45 additions and 63 deletions

View File

@@ -32,8 +32,6 @@ thread::thread(process &parent, uint8_t pri, uintptr_t rsp0) :
m_tcb.rsp0 = rsp0;
m_creator = current_cpu().thread;
m_self_handle = g_cap_table.create(this, thread::parent_caps);
parent.add_handle(m_self_handle);
}
thread::~thread()