aboutsummaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:32 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:32 +0200
commit2004bbc3ef28ada3acca05f5d5fa9108121a6784 (patch)
tree4b032c0acba5f80caf8b2802aa175f472334a26c /Process.h
parente2b58f0ab81b2aafeb8c29a69abad7829fa21ab3 (diff)
downloaddebian_htop-2004bbc3ef28ada3acca05f5d5fa9108121a6784.tar.gz
debian_htop-2004bbc3ef28ada3acca05f5d5fa9108121a6784.tar.bz2
debian_htop-2004bbc3ef28ada3acca05f5d5fa9108121a6784.zip
Imported Upstream version 1.0.2upstream/1.0.2
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/Process.h b/Process.h
index 2c3e0c3..c5f5934 100644
--- a/Process.h
+++ b/Process.h
@@ -21,6 +21,7 @@ in the source distribution for its full text.
#include "Object.h"
#include "Affinity.h"
+#include "IOPriority.h"
#include <sys/types.h>
#ifndef Process_isKernelThread
@@ -53,6 +54,7 @@ typedef enum ProcessField_ {
#ifdef HAVE_CGROUP
CGROUP,
#endif
+ IO_PRIORITY,
LAST_PROCESSFIELD
} ProcessField;
@@ -91,6 +93,7 @@ typedef struct Process_ {
long int priority;
long int nice;
long int nlwp;
+ IOPriority ioPriority;
char starttime_show[8];
time_t starttime_ctime;
#ifdef DEBUG
@@ -175,6 +178,22 @@ void Process_toggleTag(Process* this);
bool Process_setPriority(Process* this, int priority);
+bool Process_changePriorityBy(Process* this, size_t delta);
+
+IOPriority Process_updateIOPriority(Process* this);
+
+bool Process_setIOPriority(Process* this, IOPriority ioprio);
+
+/*
+[1] Note that before kernel 2.6.26 a process that has not asked for
+an io priority formally uses "none" as scheduling class, but the
+io scheduler will treat such processes as if it were in the best
+effort class. The priority within the best effort class will be
+dynamically derived from the cpu nice level of the process:
+extern io_priority;
+*/
+#define Process_effectiveIOPriority(p_) (IOPriority_class(p_->ioPriority) == IOPRIO_CLASS_NONE ? IOPriority_tuple(IOPRIO_CLASS_BE, (p_->nice + 20) / 5) : p_->ioPriority)
+
#ifdef HAVE_LIBHWLOC
Affinity* Process_getAffinity(Process* this);
@@ -189,7 +208,7 @@ bool Process_setAffinity(Process* this, Affinity* affinity);
#endif
-void Process_sendSignal(Process* this, int sgn);
+void Process_sendSignal(Process* this, size_t sgn);
int Process_pidCompare(const void* v1, const void* v2);

© 2014-2024 Faster IT GmbH | imprint | privacy policy