Print this page
re #13613 rb4516 Tunables needs volatile keyword

@@ -20,13 +20,14 @@
  */
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
+ */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * This file contains global data and code shared between master and slave parts
  * of the pseudo-terminal driver.
  *
  * Pseudo terminals (or pt's for short) are allocated dynamically.

@@ -192,14 +193,15 @@
 #define PTY_MAXDELTA 128
 
 /*
  * Tuneable variables.
  */
-uint_t  pt_cnt = 0;                     /* Minimum number of ptys */
-size_t  pt_max_pty = 0;                 /* Maximum number of ptys */
+volatile uint_t pt_cnt = 0;             /* Minimum number of ptys */
+volatile size_t pt_max_pty = 0;         /* Maximum number of ptys */
 uint_t  pt_init_cnt = NPTY_INITIAL;     /* Initial number of ptms slots */
-uint_t  pt_pctofmem = NPTY_PERCENT;     /* Percent of memory to use for ptys */
+volatile uint_t pt_pctofmem = NPTY_PERCENT;     /* Percent of memory to use */
+                                                /* for ptys */
 uint_t  pt_maxdelta = PTY_MAXDELTA;     /* Max increment for slot table size */
 
 /* Other global variables */
 
 kmutex_t ptms_lock;                     /* Global data access lock */