Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/fs/swapnode.h
          +++ new/usr/src/uts/common/sys/fs/swapnode.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
       26 +/*
       27 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       28 + */
  26   29  
  27   30  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  28   31  /*        All Rights Reserved   */
  29   32  
  30   33  
  31   34  #ifndef _SYS_FS_SWAPNODE_H
  32   35  #define _SYS_FS_SWAPNODE_H
  33   36  
  34   37  #ifdef  __cplusplus
  35   38  extern "C" {
  36   39  #endif
  37   40  
  38   41  /*
  39   42   * pointer to swapfs global data structures
  40   43   */
  41      -extern pgcnt_t swapfs_minfree;          /* amount of availrmem (in pages) */
       44 +extern volatile pgcnt_t swapfs_minfree; /* amount of availrmem (in pages) */
  42   45                                          /* that is unavailable to swapfs */
  43   46  extern pgcnt_t swapfs_desfree;
  44   47  
  45      -extern pgcnt_t swapfs_reserve;          /* amount of availrmem (in pages) */
       48 +extern volatile pgcnt_t swapfs_reserve; /* amount of availrmem (in pages) */
  46   49                                          /* that is unavailable for swap */
  47   50                                          /* reservation to non-priv processes */
  48   51  
  49   52  extern struct vnodeops *swap_vnodeops;
  50   53  extern struct vnode *swapfs_getvp(ulong_t);
  51   54  
  52   55  #ifdef SWAPFS_DEBUG
  53   56  extern int swapfs_debug;
  54   57  #define SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5)  \
  55   58          if (swapfs_debug & (X))                 \
↓ open down ↓ 15 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX