summaryrefslogtreecommitdiffstats
path: root/openbsd/OpenBSDProcessList.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd/OpenBSDProcessList.c')
-rw-r--r--openbsd/OpenBSDProcessList.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c
index 09eb383c..4f8d7b9a 100644
--- a/openbsd/OpenBSDProcessList.c
+++ b/openbsd/OpenBSDProcessList.c
@@ -447,3 +447,16 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
OpenBSDProcessList_scanProcs(opl);
}
+
+bool ProcessList_isCPUonline(const ProcessList* super, unsigned int id) {
+ assert(id < super->existingCPUs);
+
+ const OpenBSDProcessList* opl = (const OpenBSDProcessList*) super;
+
+ for (unsigned int i = 0; i < super->activeCPUs; i++) {
+ if (opl->cpus[i].cpuIndex == id)
+ return true;
+ }
+
+ return false;
+}