Print this page
6154 const-ify segment ops structures

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/vm/seg.h
          +++ new/usr/src/uts/common/vm/seg.h
↓ open down ↓ 98 lines elided ↑ open up ↑
  99   99          struct pcache_link      *p_lprev;
 100  100  } pcache_link_t;
 101  101  
 102  102  typedef struct seg {
 103  103          caddr_t s_base;                 /* base virtual address */
 104  104          size_t  s_size;                 /* size in bytes */
 105  105          uint_t  s_szc;                  /* max page size code */
 106  106          uint_t  s_flags;                /* flags for segment, see below */
 107  107          struct  as *s_as;               /* containing address space */
 108  108          avl_node_t s_tree;              /* AVL tree links to segs in this as */
 109      -        struct  seg_ops *s_ops;         /* ops vector: see below */
      109 +        const struct seg_ops *s_ops;    /* ops vector: see below */
 110  110          void *s_data;                   /* private data for instance */
 111  111          kmutex_t s_pmtx;                /* protects seg's pcache list */
 112  112          pcache_link_t s_phead;          /* head of seg's pcache list */
 113  113  } seg_t;
 114  114  
 115  115  #define S_PURGE         (0x01)          /* seg should be purged in as_gap() */
 116  116  
 117  117  struct  seg_ops {
 118  118          int     (*dup)(struct seg *, struct seg *);
 119  119          int     (*unmap)(struct seg *, caddr_t, size_t);
↓ open down ↓ 165 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX