Commit 2ef8b45d authored by Pavel Emelyanov's avatar Pavel Emelyanov

pstree: Update max_pid with thread ids

When creating helpers, we need to make sure their
PIDs do not intersect with threads' IDs.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b1a8e41d
......@@ -415,6 +415,7 @@ static int read_pstree_image(void)
for (i = 0; i < e->n_threads; i++) {
pi->threads[i].real = -1;
pi->threads[i].virt = e->threads[i];
max_pid = max((int)e->threads[i], max_pid);
}
task_entries->nr_threads += e->n_threads;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment