Lines Matching refs:P
42 Pfd2info(struct ps_prochandle *P, int fd) in Pfd2info() argument
44 fd_info_t *fip = list_next(&P->fd_head); in Pfd2info()
49 list_link(&P->fd_head, NULL); in Pfd2info()
50 fip = list_next(&P->fd_head); in Pfd2info()
53 for (i = 0; i < P->num_fd; i++, fip = list_next(fip)) { in Pfd2info()
67 list_link(fip, next ? next : (void *)&(P->fd_head)); in Pfd2info()
68 P->num_fd++; in Pfd2info()
76 load_fdinfo(struct ps_prochandle *P) in load_fdinfo() argument
84 if (P->num_fd > 0) { in load_fdinfo()
88 if (P->state != PS_DEAD && P->state != PS_IDLE) { in load_fdinfo()
99 "%s/%d/path", procfs_path, (int)P->pid); in load_fdinfo()
116 fip = Pfd2info(P, fd); in load_fdinfo()
120 if (pr_fstat64(P, fd, &stat) == 0) { in load_fdinfo()
132 info->pr_fileflags = pr_fcntl(P, fd, F_GETXFL, 0); in load_fdinfo()
133 info->pr_fdflags = pr_fcntl(P, fd, F_GETFD, 0); in load_fdinfo()
134 info->pr_offset = pr_llseek(P, fd, 0, SEEK_CUR); in load_fdinfo()
145 "%s/%d/path/%d", procfs_path, (int)P->pid, in load_fdinfo()
164 Pfdinfo_iter(struct ps_prochandle *P, proc_fdinfo_f *func, void *cd) in Pfdinfo_iter() argument
170 load_fdinfo(P); in Pfdinfo_iter()
174 for (fip = list_prev(&P->fd_head); in Pfdinfo_iter()
175 fip != (void *)&P->fd_head && fip != NULL; in Pfdinfo_iter()