]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/proc_internal.h
xnu-792.10.96.tar.gz
[apple/xnu.git] / bsd / sys / proc_internal.h
index 4147cbe1f3990f700db1d7a0fa8ed1fc3f31df7c..e0e15014632236532baa8c5add01d69782ab400a 100644 (file)
@@ -182,6 +182,7 @@ struct      proc {
        u_char  p_usrpri;       /* User-priority based on p_cpu and p_nice. */
        char    p_nice;         /* Process "nice" value. */
        char    p_comm[MAXCOMLEN+1];
+       char    p_name[(2*MAXCOMLEN)+1];
 
        struct  pgrp *p_pgrp;   /* Pointer to process group. */
 
@@ -244,6 +245,7 @@ struct      proc {
 #define P_LREFDRAIN            0x40
 #define P_LREFDRAINWAIT                0x80
 #define P_LREFDEAD             0x100
+#define P_LTHSIGSTACK  0x200
 
 /* advisory flags in the proc */
 #define P_LADVLOCK             0x01
@@ -258,10 +260,6 @@ struct     proc {
 #ifdef KERNEL
 #include <sys/time.h>  /* user_timeval, user_itimerval */
 
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=natural
-#endif
-
 struct user_extern_proc {
        union {
                struct {
@@ -278,7 +276,7 @@ struct user_extern_proc {
        pid_t   p_oppid;                /* Save parent pid during ptrace. XXX */
        int             p_dupfd;                /* Sideways return value from fdopen. XXX */
        /* Mach related  */
-       user_addr_t user_stack; /* where user stack was allocated */
+       user_addr_t user_stack __attribute((aligned(8)));       /* where user stack was allocated */
        user_addr_t exit_thread;  /* XXX Which thread is exiting? */
        int             p_debugger;             /* allow to debug */
        boolean_t       sigwait;        /* indication to suspend */
@@ -286,7 +284,7 @@ struct user_extern_proc {
        u_int   p_estcpu;        /* Time averaged value of p_cpticks. */
        int             p_cpticks;       /* Ticks of cpu time. */
        fixpt_t p_pctcpu;        /* %cpu for this process during p_swtime */
-       user_addr_t     p_wchan;         /* Sleep address. */
+       user_addr_t     p_wchan __attribute((aligned(8)));       /* Sleep address. */
        user_addr_t     p_wmesg;         /* Reason for sleep. */
        u_int   p_swtime;        /* Time swapped in or out. */
        u_int   p_slptime;       /* Time since last blocked. */
@@ -296,9 +294,9 @@ struct user_extern_proc {
        u_quad_t p_sticks;              /* Statclock hits in system mode. */
        u_quad_t p_iticks;              /* Statclock hits processing intr. */
        int             p_traceflag;            /* Kernel trace points. */
-       user_addr_t     p_tracep;       /* Trace to vnode. */
+       user_addr_t     p_tracep __attribute((aligned(8)));     /* Trace to vnode. */
        int             p_siglist;              /* DEPRECATED */
-       user_addr_t     p_textvp;       /* Vnode of executable. */
+       user_addr_t     p_textvp __attribute((aligned(8)));     /* Vnode of executable. */
        int             p_holdcnt;              /* If non-zero, don't swap. */
        sigset_t p_sigmask;     /* DEPRECATED. */
        sigset_t p_sigignore;   /* Signals being ignored. */
@@ -307,16 +305,12 @@ struct user_extern_proc {
        u_char  p_usrpri;       /* User-priority based on p_cpu and p_nice. */
        char    p_nice;         /* Process "nice" value. */
        char    p_comm[MAXCOMLEN+1];
-       user_addr_t     p_pgrp; /* Pointer to process group. */
+       user_addr_t     p_pgrp __attribute((aligned(8)));       /* Pointer to process group. */
        user_addr_t     p_addr; /* Kernel virtual addr of u-area (PROC ONLY). */
        u_short p_xstat;        /* Exit status for wait; also stop signal. */
        u_short p_acflag;       /* Accounting flags. */
-       user_addr_t     p_ru;   /* Exit information. XXX */
+       user_addr_t     p_ru __attribute((aligned(8))); /* Exit information. XXX */
 };
-
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=reset
-#endif
 #endif /* KERNEL */
 
 /*
@@ -324,6 +318,7 @@ struct user_extern_proc {
  * as it is used to represent "no process group".
  */
 extern int nprocs, maxproc;            /* Current and max number of procs. */
+extern int maxprocperuid;              /* Current number of procs per uid */
 __private_extern__ int hard_maxproc;   /* hard limit */
 
 #define        PID_MAX         30000