Add interface for adding task PID to the 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 19004bb..01cd155 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2680,6 +2680,7 @@ virResctrlInfoGetCache;
virResctrlInfoGetMonitorPrefix;
virResctrlInfoMonFree;
virResctrlInfoNew;
+virResctrlMonitorAddPID;
virResctrlMonitorDeterminePath;
virResctrlMonitorNew;
diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index 014c2fc..4489ef9 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -2522,3 +2522,11 @@ virResctrlMonitorDeterminePath(virResctrlMonitorPtr monitor,
return 0;
}
+
+
+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 baae554..52d283a 100644
--- a/src/util/virresctrl.h
+++ b/src/util/virresctrl.h
@@ -197,4 +197,8 @@ virResctrlMonitorNew(void);
int
virResctrlMonitorDeterminePath(virResctrlMonitorPtr monitor,
const char *machinename);
+
+int
+virResctrlMonitorAddPID(virResctrlMonitorPtr monitor,
+ pid_t pid);
#endif /* __VIR_RESCTRL_H__ */
--
2.7.4