thread.h 706 B

12345678910111213141516171819202122
  1. #include <linux/rbtree.h>
  2. #include <linux/list.h>
  3. #include <unistd.h>
  4. #include "symbol.h"
  5. struct thread {
  6. struct rb_node rb_node;
  7. struct list_head maps;
  8. pid_t pid;
  9. char shortname[3];
  10. char *comm;
  11. };
  12. int thread__set_comm(struct thread *self, const char *comm);
  13. struct thread *
  14. threads__findnew(pid_t pid, struct rb_root *threads, struct thread **last_match);
  15. struct thread *
  16. register_idle_thread(struct rb_root *threads, struct thread **last_match);
  17. void thread__insert_map(struct thread *self, struct map *map);
  18. int thread__fork(struct thread *self, struct thread *parent);
  19. struct map *thread__find_map(struct thread *self, u64 ip);
  20. size_t threads__fprintf(FILE *fp, struct rb_root *threads);