int tid;
while (1) {
- tid = get_next_tid(pid, &dir);
+ if (opts->with_threads)
+ tid = get_next_tid(pid, &dir);
+ else
+ tid = pid;
if (tid <= 0)
return;
- read_pageframe(pid, pid, pageframe, process_list, opts);
+ read_pageframe(pid, tid, pageframe, process_list, opts);
+
+ if (!opts->with_threads)
+ break;
}
}