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 5235046..e175c8b 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 5fc8772..93b5e70 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -2525,3 +2525,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