rst: Add abstract rst_info on pstree_item

The plan is to put collected resources on this to avoid seeking the image.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov 2012-04-18 15:42:26 +04:00
parent 781201b7a5
commit 9829dbfdeb
2 changed files with 8 additions and 0 deletions

View file

@ -219,6 +219,10 @@ static int prepare_pstree(void)
if (pi == NULL)
break;
pi->rst = xzalloc(sizeof(*pi->rst));
if (pi->rst == NULL)
break;
pi->pid = e.pid;
pi->pgid = e.pgid;
pi->sid = e.sid;

View file

@ -181,6 +181,9 @@ struct vma_area {
#define vma_area_is(vma_area, s) vma_entry_is(&((vma_area)->vma), s)
#define vma_area_len(vma_area) vma_entry_len(&((vma_area)->vma))
struct rst_info {
};
struct pstree_item {
struct list_head list;
pid_t pid; /* leader pid */
@ -192,6 +195,7 @@ struct pstree_item {
int nr_threads; /* number of threads */
u32 *threads; /* array of threads */
u32 *children; /* array of children */
struct rst_info *rst;
};
static inline int in_vma_area(struct vma_area *vma, unsigned long addr)