diff options
Diffstat (limited to 'tools/perf/util/thread_map.h')
| -rw-r--r-- | tools/perf/util/thread_map.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/util/thread_map.h b/tools/perf/util/thread_map.h index 7da80f14418..0cd8b310808 100644 --- a/tools/perf/util/thread_map.h +++ b/tools/perf/util/thread_map.h @@ -6,7 +6,7 @@ struct thread_map { int nr; - int map[]; + pid_t map[]; }; struct thread_map *thread_map__new_by_pid(pid_t pid); @@ -21,4 +21,9 @@ void thread_map__delete(struct thread_map *threads); size_t thread_map__fprintf(struct thread_map *threads, FILE *fp); +static inline int thread_map__nr(struct thread_map *threads) +{ + return threads ? threads->nr : 1; +} + #endif /* __PERF_THREAD_MAP_H */ |
