[PATCHv4 04/18] util: Add interface for adding PID to monitor

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

 



Add interface for adding task PID to monitor.

Signed-off-by: Wang Huaqiang <huaqiang.wang@xxxxxxxxx>
---
 src/libvirt_private.syms | 1 +
 src/util/virresctrl.c    | 8 ++++++++
 src/util/virresctrl.h    | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 754578f..a6259f7 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2677,6 +2677,7 @@ virResctrlInfoGetCache;
 virResctrlInfoGetMonitorPrefix;
 virResctrlInfoMonFree;
 virResctrlInfoNew;
+virResctrlMonitorAddPID;
 virResctrlMonitorNew;
 
 
diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index 8c2bb21..f2c94d2 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -2438,3 +2438,11 @@ virResctrlMonitorNew(void)
 
     return virObjectNew(virResctrlMonitorClass);
 }
+
+
+int
+virResctrlMonitorAddPID(virResctrlMonitorPtr monitor,
+                        pid_t pid)
+{
+    return virResctrlAddPID(monitor->path, pid);
+}
diff --git a/src/util/virresctrl.h b/src/util/virresctrl.h
index f59a9aa..cb9bfae 100644
--- a/src/util/virresctrl.h
+++ b/src/util/virresctrl.h
@@ -192,4 +192,8 @@ typedef virResctrlMonitor *virResctrlMonitorPtr;
 
 virResctrlMonitorPtr
 virResctrlMonitorNew(void);
+
+int
+virResctrlMonitorAddPID(virResctrlMonitorPtr monitor,
+                        pid_t pid);
 #endif /*  __VIR_RESCTRL_H__ */
-- 
2.7.4

--
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]

  Powered by Linux