Add interface for adding task PID to monitor.
Signed-off-by: Wang Huaqiang <huaqiang.wang(a)intel.com>
---
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