util: Add interface for adding PID to the monitor

Add interface for adding task PID to the monitor.

Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Wang Huaqiang 2018-11-12 21:31:37 +08:00 committed by John Ferlan
parent 575a32f63f
commit 5a7c336b4a
3 changed files with 13 additions and 0 deletions

View File

@ -2681,6 +2681,7 @@ virResctrlInfoGetCache;
virResctrlInfoGetMonitorPrefix;
virResctrlInfoMonFree;
virResctrlInfoNew;
virResctrlMonitorAddPID;
virResctrlMonitorDeterminePath;
virResctrlMonitorNew;

View File

@ -2529,3 +2529,11 @@ virResctrlMonitorDeterminePath(virResctrlMonitorPtr monitor,
return 0;
}
int
virResctrlMonitorAddPID(virResctrlMonitorPtr monitor,
pid_t pid)
{
return virResctrlAddPID(monitor->path, pid);
}

View File

@ -197,4 +197,8 @@ virResctrlMonitorNew(void);
int
virResctrlMonitorDeterminePath(virResctrlMonitorPtr monitor,
const char *machinename);
int
virResctrlMonitorAddPID(virResctrlMonitorPtr monitor,
pid_t pid);
#endif /* __VIR_RESCTRL_H__ */