Browse Source

Kernel: Add LogStream operator<< for Process.

It simply prints "process-name(pid)", nothing fancy, but kinda useful.
Andreas Kling 6 years ago
parent
commit
cda5a6eca3
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Kernel/Process.h

+ 5 - 0
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() << ')';
+}