Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/rctl_impl.h
          +++ new/usr/src/uts/common/sys/rctl_impl.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
       25 +/*
       26 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       27 + */
  25   28  
  26   29  #ifndef _SYS_RCTL_IMPL_H
  27   30  #define _SYS_RCTL_IMPL_H
  28   31  
  29      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  30      -
  31   32  #include <sys/rctl.h>
  32   33  #include <sys/time.h>
  33   34  #include <sys/types.h>
  34   35  
  35   36  #ifdef  __cplusplus
  36   37  extern "C" {
  37   38  #endif
  38   39  
  39   40  #define RCTLCTL_GET     0
  40   41  #define RCTLCTL_SET     1
↓ open down ↓ 11 lines elided ↑ open up ↑
  52   53          rctl_qty_t      rcq_enforced_value;
  53   54          rctl_priv_t     rcq_privilege;
  54   55          int             rcq_global_flagaction;
  55   56          int             rcq_global_syslog_level;
  56   57          int             rcq_local_flagaction;
  57   58          int             rcq_local_signal;
  58   59          id_t            rcq_local_recipient_pid;
  59   60          hrtime_t        rcq_firing_time;
  60   61  } rctl_opaque_t;
  61   62  
  62      -extern uint_t rlim_fd_cur;
  63      -extern uint_t rlim_fd_max;
       63 +extern volatile uint_t rlim_fd_cur;
       64 +extern volatile uint_t rlim_fd_max;
  64   65  
  65   66  /* Given an array of rctlblk_t calculate the address of the n'th element */
  66   67  #define RCTLBLK_INC(blk, n)     (rctlblk_t *)(((char *)blk) \
  67   68          + (n * rctlblk_size()))
  68   69  
  69   70  #ifdef  __cplusplus
  70   71  }
  71   72  #endif
  72   73  
  73   74  #endif  /* _SYS_RCTL_IMPL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX