[kernel] Remove thread_data pointer from TCB

The TCB is always stored at a constant offset within the thread object.
So instead of carrying an extra pointer, just implement thread::from_tcb
to get the thread.
This commit is contained in:
2020-07-19 17:01:15 -07:00
parent ef5c333030
commit c3abe035c8
5 changed files with 20 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ object_noop()
{
auto &s = scheduler::get();
TCB *tcb = s.current();
thread *th = tcb->thread_data;
thread *th = thread::from_tcb(tcb);
log::debug(logs::syscall, "Thread %llx called noop syscall.", th->koid());
return j6_status_ok;
}