X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..143464d58d2bd6378e74eec636961ceb0d32fb91:/bsd/sys/proc_info.h diff --git a/bsd/sys/proc_info.h b/bsd/sys/proc_info.h index 67842664d..670f05f57 100644 --- a/bsd/sys/proc_info.h +++ b/bsd/sys/proc_info.h @@ -95,6 +95,24 @@ struct proc_bsdshortinfo { }; +#ifdef PRIVATE +struct proc_uniqidentifierinfo { + uint8_t p_uuid[16]; /* UUID of the main executable */ + uint64_t p_uniqueid; /* 64 bit unique identifier for process */ + uint64_t p_puniqueid; /* unique identifier for process's parent */ + uint64_t p_reserve2; /* reserved for future use */ + uint64_t p_reserve3; /* reserved for future use */ + uint64_t p_reserve4; /* reserved for future use */ +}; + + +struct proc_bsdinfowithuniqid { + struct proc_bsdinfo pbsd; + struct proc_uniqidentifierinfo p_uniqidentifier; +}; +#endif + + /* pbi_flags values */ #define PROC_FLAG_SYSTEM 1 /* System process */ #define PROC_FLAG_TRACED 2 /* process currently being traced, possibly by gdb */ @@ -118,6 +136,14 @@ struct proc_bsdshortinfo { #ifdef PRIVATE #define PROC_FLAG_DARWINBG 0x8000 /* process in darwin background */ #define PROC_FLAG_EXT_DARWINBG 0x10000 /* process in darwin background - external enforcement */ +#define PROC_FLAG_IOS_APPLEDAEMON 0x20000 /* Process is apple daemon */ +#define PROC_FLAG_DELAYIDLESLEEP 0x40000 /* Process is marked to delay idle sleep on disk IO */ +#define PROC_FLAG_IOS_IMPPROMOTION 0x80000 /* Process is daemon which receives importane donation */ +#define PROC_FLAG_ADAPTIVE 0x100000 /* Process is adaptive */ +#define PROC_FLAG_ADAPTIVE_IMPORTANT 0x200000 /* Process is adaptive, and is currently important */ +#define PROC_FLAG_IMPORTANCE_DONOR 0x400000 /* Process is marked as an importance donor */ +#define PROC_FLAG_SUPPRESSED 0x800000 /* Process is suppressed */ +#define PROC_FLAG_IOS_APPLICATION 0x1000000 /* Process is an application */ #endif @@ -238,12 +264,18 @@ struct proc_fileinfo { uint32_t fi_status; off_t fi_offset; int32_t fi_type; - int32_t rfu_1; /* reserved */ + uint32_t fi_guardflags; }; /* stats flags in proc_fileinfo */ #define PROC_FP_SHARED 1 /* shared by more than one fd */ #define PROC_FP_CLEXEC 2 /* close on exec */ +#define PROC_FP_GUARDED 4 /* guarded fd */ + +#define PROC_FI_GUARD_CLOSE (1u << 0) +#define PROC_FI_GUARD_DUP (1u << 1) +#define PROC_FI_GUARD_SOCKET_IPC (1u << 2) +#define PROC_FI_GUARD_FILEPORT (1u << 3) /* * A copy of stat64 with static sized fields. @@ -642,6 +674,22 @@ struct proc_fileportinfo { #define PROC_PIDLISTFILEPORTS 14 #define PROC_PIDLISTFILEPORTS_SIZE (sizeof(struct proc_fileportinfo)) +#define PROC_PIDTHREADID64INFO 15 +#define PROC_PIDTHREADID64INFO_SIZE (sizeof(struct proc_threadinfo)) + +#define PROC_PID_RUSAGE 16 +#define PROC_PID_RUSAGE_SIZE 0 + +#ifdef PRIVATE +#define PROC_PIDUNIQIDENTIFIERINFO 17 +#define PROC_PIDUNIQIDENTIFIERINFO_SIZE \ + (sizeof(struct proc_uniqidentifierinfo)) + +#define PROC_PIDT_BSDINFOWITHUNIQID 18 +#define PROC_PIDT_BSDINFOWITHUNIQID_SIZE \ + (sizeof(struct proc_bsdinfowithuniqid)) +#endif + /* Flavors for proc_pidfdinfo */ #define PROC_PIDFDVNODEINFO 1 @@ -691,6 +739,38 @@ struct proc_fileportinfo { #define PROC_SELFSET_VMRSRCOWNER 3 +#define PROC_SELFSET_DELAYIDLESLEEP 4 + +/* used for proc_dirtycontrol */ +#define PROC_DIRTYCONTROL_TRACK 1 +#define PROC_DIRTYCONTROL_SET 2 +#define PROC_DIRTYCONTROL_GET 3 + +/* proc_track_dirty() flags */ +#define PROC_DIRTY_TRACK 0x1 +#define PROC_DIRTY_ALLOW_IDLE_EXIT 0x2 +#define PROC_DIRTY_DEFER 0x4 + +/* proc_get_dirty() flags */ +#define PROC_DIRTY_TRACKED 0x1 +#define PROC_DIRTY_ALLOWS_IDLE_EXIT 0x2 +#define PROC_DIRTY_IS_DIRTY 0x4 + +#ifdef PRIVATE + +/* __proc_info() call numbers */ +#define PROC_INFO_CALL_LISTPIDS 0x1 +#define PROC_INFO_CALL_PIDINFO 0x2 +#define PROC_INFO_CALL_PIDFDINFO 0x3 +#define PROC_INFO_CALL_KERNMSGBUF 0x4 +#define PROC_INFO_CALL_SETCONTROL 0x5 +#define PROC_INFO_CALL_PIDFILEPORTINFO 0x6 +#define PROC_INFO_CALL_TERMINATE 0x7 +#define PROC_INFO_CALL_DIRTYCONTROL 0x8 +#define PROC_INFO_CALL_PIDRUSAGE 0x9 + +#endif /* PRIVATE */ + #ifdef XNU_KERNEL_PRIVATE #ifndef pshmnode struct pshmnode;