8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 /*
  27  * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
  28  */
  29 
  30 #ifndef _SYS_PROCFS_H
  31 #define _SYS_PROCFS_H
  32 
  33 #ifdef  __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 /*
  38  * This definition is temporary.  Structured proc is the preferred API,
  39  * and the older ioctl-based interface will be removed in a future version
  40  * of Solaris.  Until then, by default, including <sys/procfs.h> will
  41  * provide the older ioctl-based /proc definitions.  To get the structured
  42  * /proc definitions, either include <procfs.h> or define _STRUCTURED_PROC
  43  * to be 1 before including <sys/procfs.h>.
  44  */
  45 #ifndef _STRUCTURED_PROC
  46 #define _STRUCTURED_PROC        0
  47 #endif
 
 216 #define PR_MSACCT  0x01000000   /* micro-state usage accounting is in effect */
 217 #define PR_BPTADJ  0x02000000   /* breakpoint trap pc adjustment is in effect */
 218 #define PR_PTRACE  0x04000000   /* ptrace-compatibility mode is in effect */
 219 #define PR_MSFORK  0x08000000   /* micro-state accounting inherited on fork */
 220 
 221 /*
 222  * See <sys/procfs_isa.h> for possible values of pr_dmodel.
 223  */
 224 
 225 /*
 226  * Reasons for stopping (pr_why).
 227  */
 228 #define PR_REQUESTED    1
 229 #define PR_SIGNALLED    2
 230 #define PR_SYSENTRY     3
 231 #define PR_SYSEXIT      4
 232 #define PR_JOBCONTROL   5
 233 #define PR_FAULTED      6
 234 #define PR_SUSPENDED    7
 235 #define PR_CHECKPOINT   8
 236 
 237 /*
 238  * lwp ps(1) information file.  /proc/<pid>/lwp/<lwpid>/lwpsinfo
 239  */
 240 #define PRFNSZ          16      /* Maximum size of execed filename */
 241 typedef struct lwpsinfo {
 242         int     pr_flag;        /* lwp flags (DEPRECATED; do not use) */
 243         id_t    pr_lwpid;       /* lwp id */
 244         uintptr_t pr_addr;      /* internal address of lwp */
 245         uintptr_t pr_wchan;     /* wait addr for sleeping lwp */
 246         char    pr_stype;       /* synchronization event type */
 247         char    pr_state;       /* numeric lwp state */
 248         char    pr_sname;       /* printable character for pr_state */
 249         char    pr_nice;        /* nice for cpu usage */
 250         short   pr_syscall;     /* system call number (if in syscall) */
 251         char    pr_oldpri;      /* pre-SVR4, low value is high priority */
 252         char    pr_cpu;         /* pre-SVR4, cpu usage for scheduling */
 253         int     pr_pri;         /* priority, high value is high priority */
 254                         /* The following percent number is a 16-bit binary */
 255                         /* fraction [0 .. 1] with the binary point to the */
 
 | 
 
 
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 /*
  27  * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
  28  * Copyright 2015, Joyent, Inc.
  29  */
  30 
  31 #ifndef _SYS_PROCFS_H
  32 #define _SYS_PROCFS_H
  33 
  34 #ifdef  __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 /*
  39  * This definition is temporary.  Structured proc is the preferred API,
  40  * and the older ioctl-based interface will be removed in a future version
  41  * of Solaris.  Until then, by default, including <sys/procfs.h> will
  42  * provide the older ioctl-based /proc definitions.  To get the structured
  43  * /proc definitions, either include <procfs.h> or define _STRUCTURED_PROC
  44  * to be 1 before including <sys/procfs.h>.
  45  */
  46 #ifndef _STRUCTURED_PROC
  47 #define _STRUCTURED_PROC        0
  48 #endif
 
 217 #define PR_MSACCT  0x01000000   /* micro-state usage accounting is in effect */
 218 #define PR_BPTADJ  0x02000000   /* breakpoint trap pc adjustment is in effect */
 219 #define PR_PTRACE  0x04000000   /* ptrace-compatibility mode is in effect */
 220 #define PR_MSFORK  0x08000000   /* micro-state accounting inherited on fork */
 221 
 222 /*
 223  * See <sys/procfs_isa.h> for possible values of pr_dmodel.
 224  */
 225 
 226 /*
 227  * Reasons for stopping (pr_why).
 228  */
 229 #define PR_REQUESTED    1
 230 #define PR_SIGNALLED    2
 231 #define PR_SYSENTRY     3
 232 #define PR_SYSEXIT      4
 233 #define PR_JOBCONTROL   5
 234 #define PR_FAULTED      6
 235 #define PR_SUSPENDED    7
 236 #define PR_CHECKPOINT   8
 237 #define PR_BRAND        9
 238 
 239 /*
 240  * lwp ps(1) information file.  /proc/<pid>/lwp/<lwpid>/lwpsinfo
 241  */
 242 #define PRFNSZ          16      /* Maximum size of execed filename */
 243 typedef struct lwpsinfo {
 244         int     pr_flag;        /* lwp flags (DEPRECATED; do not use) */
 245         id_t    pr_lwpid;       /* lwp id */
 246         uintptr_t pr_addr;      /* internal address of lwp */
 247         uintptr_t pr_wchan;     /* wait addr for sleeping lwp */
 248         char    pr_stype;       /* synchronization event type */
 249         char    pr_state;       /* numeric lwp state */
 250         char    pr_sname;       /* printable character for pr_state */
 251         char    pr_nice;        /* nice for cpu usage */
 252         short   pr_syscall;     /* system call number (if in syscall) */
 253         char    pr_oldpri;      /* pre-SVR4, low value is high priority */
 254         char    pr_cpu;         /* pre-SVR4, cpu usage for scheduling */
 255         int     pr_pri;         /* priority, high value is high priority */
 256                         /* The following percent number is a 16-bit binary */
 257                         /* fraction [0 .. 1] with the binary point to the */
 
 |