Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/procfs.h
          +++ new/usr/src/uts/common/sys/procfs.h
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  /*
  27   27   * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
       28 + * Copyright 2018 Joyent, Inc.
  28   29   */
  29   30  
  30   31  #ifndef _SYS_PROCFS_H
  31   32  #define _SYS_PROCFS_H
  32   33  
  33   34  #ifdef  __cplusplus
  34   35  extern "C" {
  35   36  #endif
  36   37  
  37   38  /*
↓ open down ↓ 20 lines elided ↑ open up ↑
  58   59  #include <sys/signal.h>
  59   60  #include <sys/siginfo.h>
  60   61  #include <sys/fault.h>
  61   62  #include <sys/syscall.h>
  62   63  #include <sys/pset.h>
  63   64  #include <sys/procfs_isa.h>
  64   65  #include <sys/priv.h>
  65   66  #include <sys/stat.h>
  66   67  #include <sys/param.h>
  67   68  #include <sys/secflags.h>
       69 +#include <sys/thread.h>
  68   70  
  69   71  /*
  70   72   * System call interfaces for /proc.
  71   73   */
  72   74  
  73   75  /*
  74   76   * Control codes (long values) for messages written to ctl and lwpctl files.
  75   77   */
  76   78  #define PCNULL   0L     /* null request, advance to next message */
  77   79  #define PCSTOP   1L     /* direct process or lwp to stop and wait for stop */
↓ open down ↓ 259 lines elided ↑ open up ↑
 337  339  typedef struct prxmap {
 338  340          uintptr_t pr_vaddr;     /* virtual address of mapping */
 339  341          size_t  pr_size;        /* size of mapping in bytes */
 340  342          char    pr_mapname[PRMAPSZ];    /* name in /proc/<pid>/object */
 341  343          offset_t pr_offset;     /* offset into mapped object, if any */
 342  344          int     pr_mflags;      /* protection and attribute flags (see below) */
 343  345          int     pr_pagesize;    /* pagesize (bytes) for this mapping */
 344  346          int     pr_shmid;       /* SysV shmid, -1 if not SysV shared memory */
 345  347          dev_t   pr_dev; /* st_dev from stat64() of mapped object, or PRNODEV */
 346  348          uint64_t pr_ino; /* st_ino from stat64() of mapped object, if any */
 347      -        size_t  pr_rss;         /* pages of resident memory */
      349 +        size_t  pr_rss;         /* pages of resident memory */
 348  350          size_t  pr_anon;        /* pages of resident anonymous memory */
 349  351          size_t  pr_locked;      /* pages of locked memory */
 350  352          size_t  pr_pad;         /* currently unused */
 351  353          uint64_t pr_hatpagesize; /* pagesize of the hat mapping */
 352  354  #ifdef  _ILP32
 353  355          ulong_t pr_filler[6];   /* filler for future expansion */
 354  356  #else
 355  357          ulong_t pr_filler[7];   /* filler for future expansion */
 356  358  #endif
 357  359  } prxmap_t;
↓ open down ↓ 170 lines elided ↑ open up ↑
 528  530          off64_t         pr_offset;
 529  531          off64_t         pr_size;
 530  532  
 531  533          int             pr_fileflags;   /* fcntl(F_GETXFL), etc */
 532  534          int             pr_fdflags;     /* fcntl(F_GETFD), etc. */
 533  535  
 534  536          char            pr_path[MAXPATHLEN];
 535  537  } prfdinfo_t;
 536  538  
 537  539  /*
      540 + * Representation of LWP name in core files.  In /proc, we use a simple char
      541 + * array, but in core files we need to make it easy to correlate the note back
      542 + * to the right LWP.  For simplicity, we'll use 32/64 consistent types.
      543 + */
      544 +typedef struct prlwpname {
      545 +        uint64_t pr_lwpid;
      546 +        char pr_lwpname[THREAD_NAME_MAX];
      547 +} prlwpname_t;
      548 +
      549 +/*
 538  550   * Header for /proc/<pid>/lstatus /proc/<pid>/lpsinfo /proc/<pid>/lusage
 539  551   */
 540  552  typedef struct prheader {
 541  553          long    pr_nent;        /* number of entries */
 542  554          long    pr_entsize;     /* size of each entry, in bytes */
 543  555  } prheader_t;
 544  556  
 545  557  /*
 546  558   * Macros for manipulating sets of flags.
 547  559   * sp must be a pointer to one of sigset_t, fltset_t, or sysset_t.
↓ open down ↓ 326 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX