thread.h 684 B

123456789101112131415161718192021
  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 *comm;
  10. };
  11. int thread__set_comm(struct thread *self, const char *comm);
  12. struct thread *
  13. threads__findnew(pid_t pid, struct rb_root *threads, struct thread **last_match);
  14. struct thread *
  15. register_idle_thread(struct rb_root *threads, struct thread **last_match);
  16. void thread__insert_map(struct thread *self, struct map *map);
  17. int thread__fork(struct thread *self, struct thread *parent);
  18. struct map *thread__find_map(struct thread *self, u64 ip);
  19. size_t threads__fprintf(FILE *fp, struct rb_root *threads);