Print this page
re #13613 rb4516 Tunables needs volatile keyword
@@ -21,10 +21,11 @@
/*
* Copyright 2007 Sun Microsystems, Inc.
* All rights reserved. Use is subject to license terms.
*/
/*
+ * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright 2015 Joyent, Inc.
*/
#ifndef _SYS_FS_TMP_H
#define _SYS_FS_TMP_H
@@ -77,11 +78,11 @@
* NB: If tmpfs allocates too much swap space, other processes will be
* unable to execute.
*/
#define TMPMINFREE 2 * 1024 * 1024 /* 2 Megabytes */
-extern size_t tmpfs_minfree; /* Anonymous memory in pages */
+extern volatile size_t tmpfs_minfree; /* Anonymous memory in pages */
/*
* tmpfs can allocate only a certain percentage of kernel memory,
* which is used for tmpnodes, directories, file names, etc.
* This is statically set as TMPMAXFRACKMEM of physical memory.
@@ -88,11 +89,11 @@
* The actual number of allocatable bytes can be patched in tmpfs_maxkmem.
*/
#define TMPMAXFRACKMEM 25 /* 1/25 of physical memory */
extern size_t tmp_kmemspace;
-extern size_t tmpfs_maxkmem; /* Allocatable kernel memory in bytes */
+extern volatile size_t tmpfs_maxkmem; /* Allocatable kernel memory in bytes */
extern void tmpnode_init(struct tmount *, struct tmpnode *,
struct vattr *, struct cred *);
extern int tmpnode_trunc(struct tmount *, struct tmpnode *, ulong_t);
extern void tmpnode_growmap(struct tmpnode *, ulong_t);