File 2000-process.patch of Package libksysguard6

diff --git a/processcore/process.cpp b/processcore/process.cpp
index c265aaea543e754a146823d81c1f919a43cccb69..647c4c4ea805cc4d51b62a5ff32e2df032f75756 100644
--- a/processcore/process.cpp
+++ b/processcore/process.cpp
@@ -165,8 +165,12 @@ QString Process::translatedStatus() const
         return i18nc("process status", "zombie");
     case Stopped:
         return i18nc("process status", "stopped");
-    case Paging:
-        return i18nc("process status", "paging");
+    case TracingStop:
+        return i18nc("process status", "tracing stop");
+    case Dead:
+        return i18nc("process status", "dead");
+    case StatusIdle:
+        return i18nc("process status", "idle");
     case Ended:
         return i18nc("process status", "finished");
     default:
@@ -187,6 +191,8 @@ QString Process::schedulerAsString() const
         return i18nc("Scheduler", "Batch");
     case SchedulerIdle:
         return i18nc("Scheduler", "Idle");
+    case Deadline:
+        return i18nc("Scheduler", "Deadline");
     default:
         return QString();
     }
diff --git a/processcore/process.h b/processcore/process.h
index 7b7460ee69e97463a6ff8a71414d86627afa7160..712277c356059dfaea509626e6814e8bf8813726 100644
--- a/processcore/process.h
+++ b/processcore/process.h
@@ -23,9 +23,9 @@ class ProcessPrivate; // forward decl d-ptr
 class PROCESSCORE_EXPORT Process
 {
 public:
-    enum ProcessStatus { Running, Sleeping, DiskSleep, Zombie, Stopped, Paging, Ended, OtherStatus = 99 };
+    enum ProcessStatus { Running, Sleeping, DiskSleep, Zombie, Stopped, TracingStop, Dead, StatusIdle, Ended, OtherStatus = 99 };
     enum IoPriorityClass { None, RealTime, BestEffort, Idle };
-    enum Scheduler { Other = 0, Fifo, RoundRobin, Batch, SchedulerIdle, Interactive }; ///< Interactive is Solaris only
+    enum Scheduler { Other = 0, Fifo, RoundRobin, Batch, SchedulerIdle, Deadline, Interactive }; ///< Interactive is Solaris only
 
     Process();
     Process(qlonglong _pid, qlonglong _ppid, Process *_parent);
diff --git a/processcore/processes_atop_p.cpp b/processcore/processes_atop_p.cpp
index 067ee6cb0855ce83183735cbfa5700a747a91ec0..dd20a88fbf9fd01197e9b519838606650f9e40df 100644
--- a/processcore/processes_atop_p.cpp
+++ b/processcore/processes_atop_p.cpp
@@ -269,9 +269,14 @@ bool ProcessesATop::updateProcessInfo(long pid, Process *process)
     case 'T':
         process->setStatus(Process::Stopped);
         break;
-    case 'W':
-        process->setStatus(Process::Paging);
+    case 't':
+        process->setStatus(Process::TracingStop);
         break;
+    case 'X':
+        process->setStatus(Process::Dead);
+        break;
+    case 'I':
+        process->setStatus(Process::StatusIdle);
     default:
         process->setStatus(Process::OtherStatus);
         break;
diff --git a/processcore/processes_linux_p.cpp b/processcore/processes_linux_p.cpp
index d250f1d299b55327bab386dd7afe57b72f7bae18..0165ba289c5b82c3d2f52d521a4bdf370c1fdbdd 100644
--- a/processcore/processes_linux_p.cpp
+++ b/processcore/processes_linux_p.cpp
@@ -390,9 +390,14 @@ bool ProcessesLocal::Private::readProcStat(const QString &dir, Process *ps)
     case 'T':
         ps->setStatus(Process::Stopped);
         break;
-    case 'W':
-        ps->setStatus(Process::Paging);
+    case 't':
+        ps->setStatus(Process::TracingStop);
         break;
+    case 'X':
+        ps->setStatus(Process::Dead);
+        break;
+    case 'I':
+        ps->setStatus(Process::StatusIdle);
     default:
         ps->setStatus(Process::OtherStatus);
         break;
@@ -477,9 +482,6 @@ bool ProcessesLocal::Private::getNiceness(long pid, Process *process)
 {
     int sched = sched_getscheduler(pid);
     switch (sched) {
-    case (SCHED_OTHER):
-        process->setScheduler(KSysGuard::Process::Other);
-        break;
     case (SCHED_RR):
         process->setScheduler(KSysGuard::Process::RoundRobin);
         break;
@@ -495,6 +497,11 @@ bool ProcessesLocal::Private::getNiceness(long pid, Process *process)
     case (SCHED_BATCH):
         process->setScheduler(KSysGuard::Process::Batch);
         break;
+#endif
+#ifdef SCHED_DEADLINE
+    case SCHED_DEADLINE:
+        process->setScheduler(KSysGuard::Process::Deadline);
+        break;
 #endif
     default:
         process->setScheduler(KSysGuard::Process::Other);
@@ -716,6 +723,11 @@ Processes::Error ProcessesLocal::setScheduler(long pid, int priorityClass, int p
     case (KSysGuard::Process::Batch):
         policy = SCHED_BATCH;
         break;
+#endif
+#ifdef SCHED_DEADLINE
+    case KSysGuard::Process::Deadline:
+        policy = SCHED_DEADLINE;
+        break;
 #endif
     default:
         return Processes::NotSupported;
openSUSE Build Service is sponsored by