sysv_shm.c (216104) | sysv_shm.c (217555) |
---|---|
1/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ 2/*- 3 * Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 46 unchanged lines hidden (view full) --- 55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 59 * SUCH DAMAGE. 60 */ 61 62#include <sys/cdefs.h> | 1/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ 2/*- 3 * Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 46 unchanged lines hidden (view full) --- 55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 59 * SUCH DAMAGE. 60 */ 61 62#include <sys/cdefs.h> |
63__FBSDID("$FreeBSD: head/sys/kern/sysv_shm.c 216104 2010-12-02 01:14:45Z trasz $"); | 63__FBSDID("$FreeBSD: head/sys/kern/sysv_shm.c 217555 2011-01-18 21:14:18Z mdf $"); |
64 65#include "opt_compat.h" 66#include "opt_sysvipc.h" 67 68#include <sys/param.h> 69#include <sys/systm.h> 70#include <sys/kernel.h> 71#include <sys/limits.h> --- 100 unchanged lines hidden (view full) --- 172 "Number of segments per process"); 173SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmall, CTLFLAG_RW, &shminfo.shmall, 0, 174 "Maximum number of pages available for shared memory"); 175SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_phys, CTLFLAG_RW, 176 &shm_use_phys, 0, "Enable/Disable locking of shared memory pages in core"); 177SYSCTL_INT(_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RW, 178 &shm_allow_removed, 0, 179 "Enable/Disable attachment to attached segments marked for removal"); | 64 65#include "opt_compat.h" 66#include "opt_sysvipc.h" 67 68#include <sys/param.h> 69#include <sys/systm.h> 70#include <sys/kernel.h> 71#include <sys/limits.h> --- 100 unchanged lines hidden (view full) --- 172 "Number of segments per process"); 173SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmall, CTLFLAG_RW, &shminfo.shmall, 0, 174 "Maximum number of pages available for shared memory"); 175SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_phys, CTLFLAG_RW, 176 &shm_use_phys, 0, "Enable/Disable locking of shared memory pages in core"); 177SYSCTL_INT(_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RW, 178 &shm_allow_removed, 0, 179 "Enable/Disable attachment to attached segments marked for removal"); |
180SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLFLAG_RD, | 180SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE | CTLFLAG_RD, |
181 NULL, 0, sysctl_shmsegs, "", 182 "Current number of shared memory segments allocated"); 183 184static int 185shm_find_segment_by_key(key) 186 key_t key; 187{ 188 int i; --- 1192 unchanged lines hidden --- | 181 NULL, 0, sysctl_shmsegs, "", 182 "Current number of shared memory segments allocated"); 183 184static int 185shm_find_segment_by_key(key) 186 key_t key; 187{ 188 int i; --- 1192 unchanged lines hidden --- |