summaryrefslogtreecommitdiffstats
path: root/ProcessList.h
diff options
context:
space:
mode:
authorDenis Lisov <dennis.lissov@gmail.com>2021-12-16 19:09:03 +0300
committerBenBE <BenBE@geshi.org>2022-02-13 19:50:16 +0100
commit58b42e4cac462cf4742566d9567cc8c3ac52cf8f (patch)
treef31880a876b6c9951a6d77385dcddf1db45ccfc7 /ProcessList.h
parent2477a5a0183cee5834e7a5480a295dd8195ee968 (diff)
ProcessList: introduce displayList
Separate `processes` (the vector owning the processes, sorted in whatever order is needed right now internally) and `displayList` (a vector referencing the processes in the same order they're to be displayed).
Diffstat (limited to 'ProcessList.h')
-rw-r--r--ProcessList.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ProcessList.h b/ProcessList.h
index 23203928..e438421f 100644
--- a/ProcessList.h
+++ b/ProcessList.h
@@ -43,9 +43,9 @@ typedef unsigned long long int memory_t;
typedef struct ProcessList_ {
const Settings* settings;
- Vector* processes;
- Vector* processes2;
- Hashtable* processTable;
+ Vector* processes; /* all known processes; sort order can vary and differ from display order */
+ Vector* displayList; /* process tree flattened in display order (borrowed) */
+ Hashtable* processTable; /* fast known process lookup by PID */
UsersTable* usersTable;
Hashtable* displayTreeSet;
@@ -109,7 +109,7 @@ void ProcessList_add(ProcessList* this, Process* p);
void ProcessList_remove(ProcessList* this, const Process* p);
-void ProcessList_sort(ProcessList* this);
+void ProcessList_updateDisplayList(ProcessList* this);
ProcessField ProcessList_keyAt(const ProcessList* this, int at);

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