Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/timer.c
          +++ new/usr/src/uts/common/os/timer.c
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
  28   28   * Copyright (c) 2012, Joyent, Inc. All rights reserved.
       29 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  29   30   */
  30   31  
  31   32  #include <sys/timer.h>
  32   33  #include <sys/systm.h>
  33   34  #include <sys/param.h>
  34   35  #include <sys/kmem.h>
  35   36  #include <sys/debug.h>
  36   37  #include <sys/policy.h>
  37   38  #include <sys/port_impl.h>
  38   39  #include <sys/port_kernel.h>
↓ open down ↓ 5 lines elided ↑ open up ↑
  44   45  static void timer_close_port(void *, int, pid_t, int);
  45   46  
  46   47  #define CLOCK_BACKEND(clk) \
  47   48          ((clk) < CLOCK_MAX && (clk) >= 0 ? clock_backend[(clk)] : NULL)
  48   49  
  49   50  /*
  50   51   * Tunable to increase the maximum number of POSIX timers per-process.  This
  51   52   * may _only_ be tuned in /etc/system or by patching the kernel binary; it
  52   53   * _cannot_ be tuned on a running system.
  53   54   */
  54      -int timer_max = _TIMER_MAX;
       55 +volatile int timer_max = _TIMER_MAX;
  55   56  
  56   57  /*
  57   58   * timer_lock() locks the specified interval timer.  It doesn't look at the
  58   59   * ITLK_REMOVE bit; it's up to callers to look at this if they need to
  59   60   * care.  p_lock must be held on entry; it may be dropped and reaquired,
  60   61   * but timer_lock() will always return with p_lock held.
  61   62   *
  62   63   * Note that timer_create() doesn't call timer_lock(); it creates timers
  63   64   * with the ITLK_LOCKED bit explictly set.
  64   65   */
↓ open down ↓ 932 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX