From cda5a6eca382b4d1fc8c0aec7e69cc4ed66927c1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 8 Jul 2019 18:58:19 +0200 Subject: [PATCH] Kernel: Add LogStream operator<< for Process. It simply prints "process-name(pid)", nothing fancy, but kinda useful. --- Kernel/Process.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Kernel/Process.h b/Kernel/Process.h index 04068068bc6..c3205288651 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -474,3 +474,8 @@ inline int Thread::pid() const { return m_process.pid(); } + +inline const LogStream& operator<<(const LogStream& stream, const Process& process) +{ + return stream << process.name() << '(' << process.pid() << ')'; +}