[libvirt] [PATCHv7 06/18] util: Add interface for adding PID to the monitor

Wang Huaqiang posted 18 patches 5 years, 11 months ago
[libvirt] [PATCHv7 06/18] util: Add interface for adding PID to the monitor
Posted by Wang Huaqiang 5 years, 11 months ago
Add interface for adding task PID to the monitor.

Signed-off-by: Wang Huaqiang <huaqiang.wang@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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv7 06/18] util: Add interface for adding PID to the monitor
Posted by John Ferlan 5 years, 11 months ago

On 10/22/18 4:01 AM, Wang Huaqiang wrote:
> Add interface for adding task PID to the monitor.
> 
> Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
> ---
>  src/libvirt_private.syms | 1 +
>  src/util/virresctrl.c    | 8 ++++++++
>  src/util/virresctrl.h    | 4 ++++
>  3 files changed, 13 insertions(+)
> 

Reviewed-by: John Ferlan <jferlan@redhat.com>

John

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