Print this page
6154 const-ify segment ops structures

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/proc/prsubr.c
          +++ new/usr/src/uts/common/fs/proc/prsubr.c
↓ open down ↓ 89 lines elided ↑ open up ↑
  90   90  
  91   91  typedef struct prpagev {
  92   92          uint_t *pg_protv;       /* vector of page permissions */
  93   93          char *pg_incore;        /* vector of incore flags */
  94   94          size_t pg_npages;       /* number of pages in protv and incore */
  95   95          ulong_t pg_pnbase;      /* pn within segment of first protv element */
  96   96  } prpagev_t;
  97   97  
  98   98  size_t pagev_lim = 256 * 1024;  /* limit on number of pages in prpagev_t */
  99   99  
 100      -extern struct seg_ops segdev_ops;       /* needs a header file */
 101      -extern struct seg_ops segspt_shmops;    /* needs a header file */
      100 +extern const struct seg_ops segdev_ops; /* needs a header file */
      101 +extern const struct seg_ops segspt_shmops;      /* needs a header file */
 102  102  
 103  103  static  int     set_watched_page(proc_t *, caddr_t, caddr_t, ulong_t, ulong_t);
 104  104  static  void    clear_watched_page(proc_t *, caddr_t, caddr_t, ulong_t);
 105  105  
 106  106  /*
 107  107   * Choose an lwp from the complete set of lwps for the process.
 108  108   * This is called for any operation applied to the process
 109  109   * file descriptor that requires an lwp to operate upon.
 110  110   *
 111  111   * Returns a pointer to the thread for the selected LWP,
↓ open down ↓ 4221 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX