+
+#ifdef BSD_KERNEL_PRIVATE
+#include <sys/proc_internal.h>
+
+// LP64todo - should this move?
+
+/* LP64 version of _pcred. all pointers
+ * grow when we're dealing with a 64-bit process.
+ * WARNING - keep in sync with _pcred
+ */
+
+#if __DARWIN_ALIGN_NATURAL
+#pragma options align=natural
+#endif
+
+struct user_pcred {
+ char pc_lock[72]; /* opaque content */
+ user_addr_t pc_ucred; /* Current credentials. */
+ uid_t p_ruid; /* Real user id. */
+ uid_t p_svuid; /* Saved effective user id. */
+ gid_t p_rgid; /* Real group id. */
+ gid_t p_svgid; /* Saved effective group id. */
+ int p_refcnt; /* Number of references. */
+};
+
+/* LP64 version of kinfo_proc. all pointers
+ * grow when we're dealing with a 64-bit process.
+ * WARNING - keep in sync with kinfo_proc
+ */
+struct user_kinfo_proc {
+ struct user_extern_proc kp_proc; /* proc structure */
+ struct user_eproc {
+ user_addr_t e_paddr; /* address of proc */
+ user_addr_t e_sess; /* session pointer */
+ struct user_pcred e_pcred; /* process credentials */
+ struct _ucred e_ucred; /* current credentials */
+ struct user_vmspace e_vm; /* address space */
+ pid_t e_ppid; /* parent process id */
+ pid_t e_pgid; /* process group id */
+ short e_jobc; /* job control counter */
+ dev_t e_tdev; /* controlling tty dev */
+ pid_t e_tpgid; /* tty process group id */
+ user_addr_t e_tsess; /* tty session pointer */
+ char e_wmesg[WMESGLEN+1]; /* wchan message */
+ segsz_t e_xsize; /* text size */
+ short e_xrssize; /* text rss */
+ short e_xccount; /* text references */
+ short e_xswrss;
+ int32_t e_flag;
+ char e_login[COMAPT_MAXLOGNAME]; /* short setlogin() name */
+ int32_t e_spare[4];
+ } kp_eproc;
+};
+
+#if __DARWIN_ALIGN_NATURAL
+#pragma options align=reset
+#endif
+
+#endif /* BSD_KERNEL_PRIVATE */
+