Add pid/tid to all log messages

This commit is contained in:
Drew Galbraith 2023-05-30 23:22:29 -07:00
parent 2eefda6114
commit 9e3df0ccd0
4 changed files with 27 additions and 9 deletions

View file

@ -41,14 +41,14 @@ Thread::Thread(Process& proc, uint64_t tid, uint64_t entry)
uint64_t Thread::pid() const { return process_.id(); }
void Thread::Init() {
dbgln("[%u.%u] thread start.", pid(), id_);
dbgln("Thread start.", pid(), id_);
uint64_t rsp = process_.vmm().AllocateUserStack();
SetRsp0(rsp0_start_);
jump_user_space(rip_, rsp);
}
void Thread::Exit() {
dbgln("[%u.%u] Exiting", pid(), id_);
dbgln("Exiting", pid(), id_);
state_ = FINISHED;
process_.CheckState();
gScheduler->Yield();