#define PROC_FLAG_SLEADER 0x20
#define PROC_FLAG_CTTY 0x40
#define PROC_FLAG_CONTROLT 0x80
+#define PROC_FLAG_THCWD 0x100
struct proc_taskinfo {
int32_t pth_curpri; /* cur priority*/
int32_t pth_priority; /* priority*/
int32_t pth_maxpriority; /* max priority*/
+ char * pth_name[64]; /* thread name, if any */
};
struct proc_regioninfo {
uint32_t pri_private_pages_resident;
uint32_t pri_shared_pages_resident;
uint32_t pri_obj_id;
+ uint32_t pri_depth;
uint64_t pri_address;
uint64_t pri_size;
- uint32_t pri_depth;
};
#define PROC_REGION_SUBMAP 1
int32_t fi_type;
};
+/* stats flags in proc_fileinfo */
+#define PROC_FP_SHARED 1 /* shared by more than one fd */
+#define PROC_FP_CLEXEC 2 /* close on exec */
+
+/*
+ * A copy of stat64 with static sized fields.
+ */
+struct vinfo_stat {
+ uint32_t vst_dev; /* [XSI] ID of device containing file */
+ uint16_t vst_mode; /* [XSI] Mode of file (see below) */
+ uint16_t vst_nlink; /* [XSI] Number of hard links */
+ uint64_t vst_ino; /* [XSI] File serial number */
+ uid_t vst_uid; /* [XSI] User ID of the file */
+ gid_t vst_gid; /* [XSI] Group ID of the file */
+ int64_t vst_atime; /* [XSI] Time of last access */
+ int64_t vst_atimensec; /* nsec of last access */
+ int64_t vst_mtime; /* [XSI] Last data modification time */
+ int64_t vst_mtimensec; /* last data modification nsec */
+ int64_t vst_ctime; /* [XSI] Time of last status change */
+ int64_t vst_ctimensec; /* nsec of last status change */
+ int64_t vst_birthtime; /* File creation time(birth) */
+ int64_t vst_birthtimensec; /* nsec of File creation time */
+ off_t vst_size; /* [XSI] file size, in bytes */
+ int64_t vst_blocks; /* [XSI] blocks allocated for file */
+ int32_t vst_blksize; /* [XSI] optimal blocksize for I/O */
+ uint32_t vst_flags; /* user defined flags for file */
+ uint32_t vst_gen; /* file generation number */
+ uint32_t vst_rdev; /* [XSI] Device ID */
+ int64_t vst_qspare[2]; /* RESERVED: DO NOT USE! */
+};
struct vnode_info {
- struct stat vi_stat;
- int vi_type;
- fsid_t vi_fsid;
+ struct vinfo_stat vi_stat;
+ int vi_type;
+ fsid_t vi_fsid;
+ int vi_pad;
};
struct vnode_info_path {
};
struct vnode_fdinfo {
- struct proc_fileinfo pfi;
+ struct proc_fileinfo pfi;
struct vnode_info pvi;
};
struct vnode_fdinfowithpath {
struct proc_fileinfo pfi;
struct vnode_info_path pvip;
-
};
-
struct proc_regionwithpathinfo {
struct proc_regioninfo prp_prinfo;
struct vnode_info_path prp_vip;
struct vnode_info_path pvi_rdir;
};
+struct proc_threadwithpathinfo {
+ struct proc_threadinfo pt;
+ struct vnode_info_path pvip;
+};
/*
* Socket
struct psem_info {
- struct stat psem_stat;
+ struct vinfo_stat psem_stat;
char psem_name[MAXPATHLEN];
};
struct pshm_info {
- struct stat pshm_stat;
+ struct vinfo_stat pshm_stat;
uint64_t pshm_mappaddr;
char pshm_name[MAXPATHLEN];
};
struct pipe_info {
- struct stat pipe_stat;
+ struct vinfo_stat pipe_stat;
uint64_t pipe_handle;
uint64_t pipe_peerhandle;
int pipe_status;
struct kqueue_info {
- struct stat kq_stat;
+ struct vinfo_stat kq_stat;
uint32_t kq_state;
};
#define PROC_KQUEUE_SELECT 1
};
struct appletalk_info {
- struct stat atalk_stat;
+ struct vinfo_stat atalk_stat;
};
struct appletalk_fdinfo {
#define PROC_PIDVNODEPATHINFO 9
#define PROC_PIDVNODEPATHINFO_SIZE (sizeof(struct proc_vnodepathinfo))
+#define PROC_PIDTHREADPATHINFO 10
+#define PROC_PIDTHREADPATHINFO_SIZE (sizeof(struct proc_threadwithpathinfo))
+
+#define PROC_PIDPATHINFO 11
+#define PROC_PIDPATHINFO_SIZE (MAXPATHLEN)
+#define PROC_PIDPATHINFO_MAXSIZE (4*MAXPATHLEN)
+
/* Flavors for proc_pidfdinfo */
#define PROC_PIDFDVNODEINFO 1