summaryrefslogtreecommitdiffstats
path: root/Scheduling.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2023-04-17 19:04:04 +0200
committercgzones <cgzones@googlemail.com>2024-04-06 19:42:28 +0200
commit48181bc237d2b3118b6fb06b82e427082a92e0e7 (patch)
treee745b4138715a958b5efd817530dc3b92da8d69e /Scheduling.c
parentb4d5b5cea98f557a856c89500dc169f511a2b817 (diff)
Linux: update gathering information regarding threads
Document for each block gathering information about a task whether the information is shared for the whole process or specific to a single userland thread. Also avoid system calls for process-shared information and reuse the information from the main task.
Diffstat (limited to 'Scheduling.c')
-rw-r--r--Scheduling.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Scheduling.c b/Scheduling.c
index d5c4b8a6..406caf7d 100644
--- a/Scheduling.c
+++ b/Scheduling.c
@@ -156,6 +156,9 @@ const char* Scheduling_formatPolicy(int policy) {
}
}
+/*
+ * Gather scheduling policy (thread-specific data)
+ */
void Scheduling_readProcessPolicy(Process* proc) {
proc->scheduling_policy = sched_getscheduler(Process_getPid(proc));
}

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