Print this page
re #13613 rb4516 Tunables needs volatile keyword

@@ -20,10 +20,13 @@
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
+ */
 
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/errno.h>

@@ -55,12 +58,12 @@
  * space should do so by setting swapfs_desfree at boot time,
  * not swapfs_minfree.
  */
 
 pgcnt_t swapfs_desfree = 0;
-pgcnt_t swapfs_minfree = 0;
-pgcnt_t swapfs_reserve = 0;
+volatile pgcnt_t swapfs_minfree = 0;
+volatile pgcnt_t swapfs_reserve = 0;
 
 #ifdef SWAPFS_DEBUG
 int swapfs_debug;
 #endif /* SWAPFS_DEBUG */