From: Wang Huaqiang Date: Mon, 12 Nov 2018 13:31:37 +0000 (+0800) Subject: util: Add interface for adding PID to the monitor X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5a7c336b4ac37001dbb68b0f034c0770216d4489;p=libvirt.git util: Add interface for adding PID to the monitor Add interface for adding task PID to the monitor. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9d188826ae..925c97d578 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2681,6 +2681,7 @@ virResctrlInfoGetCache; virResctrlInfoGetMonitorPrefix; virResctrlInfoMonFree; virResctrlInfoNew; +virResctrlMonitorAddPID; virResctrlMonitorDeterminePath; virResctrlMonitorNew; diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index b8f6a6c079..e35b10937f 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -2529,3 +2529,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 baae55443b..52d283aac1 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__ */