diff options
-rw-r--r-- | Applications/SystemMonitor/ProcessModel.cpp | 24 | ||||
-rw-r--r-- | Applications/SystemMonitor/ProcessModel.h | 8 |
2 files changed, 31 insertions, 1 deletions
diff --git a/Applications/SystemMonitor/ProcessModel.cpp b/Applications/SystemMonitor/ProcessModel.cpp index 5fe3353781..26b94d1606 100644 --- a/Applications/SystemMonitor/ProcessModel.cpp +++ b/Applications/SystemMonitor/ProcessModel.cpp @@ -90,6 +90,12 @@ String ProcessModel::column_name(int column) const return "PID"; case Column::TID: return "TID"; + case Column::PPID: + return "PPID"; + case Column::PGID: + return "PGID"; + case Column::SID: + return "SID"; case Column::State: return "State"; case Column::User: @@ -165,6 +171,9 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, Role role) const return Gfx::TextAlignment::CenterLeft; case Column::PID: case Column::TID: + case Column::PPID: + case Column::PGID: + case Column::SID: case Column::Priority: case Column::EffectivePriority: case Column::Virtual: @@ -202,6 +211,12 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, Role role) const return thread.current_state.pid; case Column::TID: return thread.current_state.tid; + case Column::PPID: + return thread.current_state.ppid; + case Column::PGID: + return thread.current_state.pgid; + case Column::SID: + return thread.current_state.sid; case Column::State: return thread.current_state.state; case Column::User: @@ -273,6 +288,12 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, Role role) const return thread.current_state.pid; case Column::TID: return thread.current_state.tid; + case Column::PPID: + return thread.current_state.ppid; + case Column::PGID: + return thread.current_state.pgid; + case Column::SID: + return thread.current_state.sid; case Column::State: return thread.current_state.state; case Column::User: @@ -366,7 +387,10 @@ void ProcessModel::update() state.name = thread.name; + state.ppid = it.value.ppid; state.tid = thread.tid; + state.pgid = it.value.pgid; + state.sid = it.value.sid; state.times_scheduled = thread.times_scheduled; state.cpu = thread.cpu; state.priority = thread.priority; diff --git a/Applications/SystemMonitor/ProcessModel.h b/Applications/SystemMonitor/ProcessModel.h index e6f254d9a4..a60053ef10 100644 --- a/Applications/SystemMonitor/ProcessModel.h +++ b/Applications/SystemMonitor/ProcessModel.h @@ -57,6 +57,9 @@ public: User, PID, TID, + PPID, + PGID, + SID, Virtual, Physical, DirtyPrivate, @@ -107,8 +110,11 @@ private: ProcessModel(); struct ThreadState { - int tid; + pid_t tid; pid_t pid; + pid_t ppid; + pid_t pgid; + pid_t sid; unsigned times_scheduled; String name; String state; |