[PATCH 2/2] FreeBSD: stub out CPU affinity functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/util/processinfo.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/util/processinfo.c b/src/util/processinfo.c
index b1db049..4822bcc 100644
--- a/src/util/processinfo.c
+++ b/src/util/processinfo.c
@@ -168,6 +168,28 @@ realloc:
     return 0;
 }
 
+#elif defined(__FreeBSD__)
+
+int virProcessInfoSetAffinity(pid_t pid ATTRIBUTE_UNUSED,
+                              virBitmapPtr map ATTRIBUTE_UNUSED)
+{
+    return 0;
+}
+
+int virProcessInfoGetAffinity(pid_t pid ATTRIBUTE_UNUSED,
+                              virBitmapPtr *map,
+                              int maxcpu)
+{
+    *map = virBitmapNew(maxcpu);
+    if (!map) {
+        virReportOOMError();
+        return -1;
+    }
+    virBitmapSetAll(*map);
+
+    return 0;
+}
+
 #else /* HAVE_SCHED_GETAFFINITY */
 
 int virProcessInfoSetAffinity(pid_t pid ATTRIBUTE_UNUSED,
-- 
1.8.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]