Print this page
re #13613 rb4516 Tunables needs volatile keyword
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/fs/swapnode.h
+++ new/usr/src/uts/common/sys/fs/swapnode.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 +/*
27 + * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
28 + */
26 29
27 30 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 31 /* All Rights Reserved */
29 32
30 33
31 34 #ifndef _SYS_FS_SWAPNODE_H
32 35 #define _SYS_FS_SWAPNODE_H
33 36
34 37 #ifdef __cplusplus
35 38 extern "C" {
36 39 #endif
37 40
38 41 /*
39 42 * pointer to swapfs global data structures
40 43 */
41 -extern pgcnt_t swapfs_minfree; /* amount of availrmem (in pages) */
44 +extern volatile pgcnt_t swapfs_minfree; /* amount of availrmem (in pages) */
42 45 /* that is unavailable to swapfs */
43 46 extern pgcnt_t swapfs_desfree;
44 47
45 -extern pgcnt_t swapfs_reserve; /* amount of availrmem (in pages) */
48 +extern volatile pgcnt_t swapfs_reserve; /* amount of availrmem (in pages) */
46 49 /* that is unavailable for swap */
47 50 /* reservation to non-priv processes */
48 51
49 52 extern struct vnodeops *swap_vnodeops;
50 53 extern struct vnode *swapfs_getvp(ulong_t);
51 54
52 55 #ifdef SWAPFS_DEBUG
53 56 extern int swapfs_debug;
54 57 #define SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5) \
55 58 if (swapfs_debug & (X)) \
56 59 printf(S, Y1, Y2, Y3, Y4, Y5);
57 60 #define SWAP_SUBR 0x01
58 61 #define SWAP_VOPS 0x02
59 62 #define SWAP_VFSOPS 0x04
60 63 #define SWAP_PGC 0x08
61 64 #define SWAP_PUTP 0x10
62 65 #else /* SWAPFS_DEBUG */
63 66 #define SWAPFS_PRINT(X, S, Y1, Y2, Y3, Y4, Y5)
64 67 #endif /* SWAPFS_DEBUG */
65 68
66 69 #ifdef __cplusplus
67 70 }
68 71 #endif
69 72
70 73 #endif /* _SYS_FS_SWAPNODE_H */
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX