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 d2573c5..4a52a86 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2680,6 +2680,7 @@ virResctrlInfoGetCache; virResctrlInfoGetMonitorPrefix; virResctrlInfoMonFree; virResctrlInfoNew; +virResctrlMonitorAddPID; virResctrlMonitorNew; diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 41c7e51..c9a79f7 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -2436,3 +2436,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