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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libproc/common/Pcontrol.h
          +++ new/usr/src/lib/libproc/common/Pcontrol.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  /*
  26   26   * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
  27      - * Copyright (c) 2014, Joyent, Inc. All rights reserved.
  28   27   * Copyright (c) 2013 by Delphix. All rights reserved.
       28 + * Copyright 2018 Joyent, Inc.
  29   29   */
  30   30  
  31   31  #ifndef _PCONTROL_H
  32   32  #define _PCONTROL_H
  33   33  
  34   34  /*
  35   35   * Implemention-specific include file for libproc process management.
  36   36   * This is not to be seen by the clients of libproc.
  37   37   */
  38   38  
  39   39  #include <stdio.h>
  40   40  #include <gelf.h>
  41   41  #include <synch.h>
  42   42  #include <procfs.h>
  43   43  #include <rtld_db.h>
  44   44  #include <libproc.h>
  45   45  #include <libctf.h>
  46   46  #include <limits.h>
  47   47  #include <libproc.h>
       48 +#include <thread.h>
  48   49  #include <sys/secflags.h>
  49   50  
  50   51  #ifdef  __cplusplus
  51   52  extern "C" {
  52   53  #endif
  53   54  
  54   55  #include "Putil.h"
  55   56  
  56   57  /*
  57   58   * Definitions of the process control structures, internal to libproc.
↓ open down ↓ 71 lines elided ↑ open up ↑
 129  130          file_info_t *map_file;  /* pointer into list of mapped files */
 130  131          off64_t map_offset;     /* offset into core file (if core) */
 131  132          int map_relocate;       /* associated file_map needs to be relocated */
 132  133  } map_info_t;
 133  134  
 134  135  typedef struct lwp_info {       /* per-lwp information from core file */
 135  136          plist_t lwp_list;       /* linked list */
 136  137          lwpid_t lwp_id;         /* lwp identifier */
 137  138          lwpsinfo_t lwp_psinfo;  /* /proc/<pid>/lwp/<lwpid>/lwpsinfo data */
 138  139          lwpstatus_t lwp_status; /* /proc/<pid>/lwp/<lwpid>/lwpstatus data */
      140 +        char lwp_name[THREAD_NAME_MAX];
 139  141  #if defined(sparc) || defined(__sparc)
 140  142          gwindows_t *lwp_gwins;  /* /proc/<pid>/lwp/<lwpid>/gwindows data */
 141  143          prxregset_t *lwp_xregs; /* /proc/<pid>/lwp/<lwpid>/xregs data */
 142  144          int64_t *lwp_asrs;      /* /proc/<pid>/lwp/<lwpid>/asrs data */
 143  145  #endif
 144  146  } lwp_info_t;
 145  147  
 146  148  typedef struct fd_info {
 147  149          plist_t fd_list;        /* linked list */
 148  150          prfdinfo_t fd_info;     /* fd info */
↓ open down ↓ 117 lines elided ↑ open up ↑
 266  268  extern  void    prldump(const char *, lwpstatus_t *);
 267  269  extern  int     dupfd(int, int);
 268  270  extern  int     set_minfd(void);
 269  271  extern  int     Pscantext(struct ps_prochandle *);
 270  272  extern  void    Pinitsym(struct ps_prochandle *);
 271  273  extern  void    Preadauxvec(struct ps_prochandle *);
 272  274  extern  void    optimize_symtab(sym_tbl_t *);
 273  275  extern  void    Pbuild_file_symtab(struct ps_prochandle *, file_info_t *);
 274  276  extern  ctf_file_t *Pbuild_file_ctf(struct ps_prochandle *, file_info_t *);
 275  277  extern  map_info_t *Paddr2mptr(struct ps_prochandle *, uintptr_t);
 276      -extern  char    *Pfindexec(struct ps_prochandle *, const char *,
      278 +extern  char    *Pfindexec(struct ps_prochandle *, const char *,
 277  279          int (*)(const char *, void *), void *);
 278  280  extern  int     getlwpstatus(struct ps_prochandle *, lwpid_t, lwpstatus_t *);
 279  281  int     Pstopstatus(struct ps_prochandle *, long, uint32_t);
 280  282  extern  file_info_t *file_info_new(struct ps_prochandle *, map_info_t *);
 281  283  extern  char    *Plofspath(const char *, char *, size_t);
 282  284  extern  char    *Pzoneroot(struct ps_prochandle *, char *, size_t);
 283  285  extern  char    *Pzonepath(struct ps_prochandle *, const char *, char *,
 284  286          size_t);
 285  287  extern  fd_info_t *Pfd2info(struct ps_prochandle *, int);
 286  288  
↓ open down ↓ 29 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX