diff options
author | csjp <csjp@FreeBSD.org> | 2005-08-06 07:20:18 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2005-08-06 07:20:18 +0000 |
commit | 8d2abe7f0012fbe9a1b7b4d60141fe7ef7773ff7 (patch) | |
tree | 7f404867df31caa4a760d72c567e74af206dd740 /sys/kern | |
parent | e9468c65532d1fe2f9cce67495e244703ba8007b (diff) | |
download | FreeBSD-src-8d2abe7f0012fbe9a1b7b4d60141fe7ef7773ff7.zip FreeBSD-src-8d2abe7f0012fbe9a1b7b4d60141fe7ef7773ff7.tar.gz |
Change the data type of the upper shared memory limits from a signed
integer to an unsigned long. This lifts variables like the maximum
number of pages available for shared memory from 2^31 to 2^32 on 32
bit architectures, and from 2^31 to 2^64 on 64 bit architectures.
It should be noted that this changes breaks ABI on 64 bit architectures
because the size of the shmmax, shmmin, shmmni, shmseg and shmall members
of the shminfo structure has changed.
Silence on: current@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sysv_shm.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 02f96e6..637beb1 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -177,15 +177,15 @@ static int shm_use_phys; static int shm_allow_removed; SYSCTL_DECL(_kern_ipc); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RW, &shminfo.shmmax, 0, +SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RW, &shminfo.shmmax, 0, "Maximum shared memory segment size"); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmmin, CTLFLAG_RW, &shminfo.shmmin, 0, +SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmmin, CTLFLAG_RW, &shminfo.shmmin, 0, "Minimum shared memory segment size"); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmmni, CTLFLAG_RDTUN, &shminfo.shmmni, 0, +SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmmni, CTLFLAG_RDTUN, &shminfo.shmmni, 0, "Number of shared memory identifiers"); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmseg, CTLFLAG_RDTUN, &shminfo.shmseg, 0, +SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmseg, CTLFLAG_RDTUN, &shminfo.shmseg, 0, "Number of segments per process"); -SYSCTL_INT(_kern_ipc, OID_AUTO, shmall, CTLFLAG_RW, &shminfo.shmall, 0, +SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmall, CTLFLAG_RW, &shminfo.shmall, 0, "Maximum number of pages available for shared memory"); SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_phys, CTLFLAG_RW, &shm_use_phys, 0, "Enable/Disable locking of shared memory pages in core"); @@ -955,15 +955,15 @@ shminit() { int i; - TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall); + TUNABLE_ULONG_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall); for (i = PAGE_SIZE; i > 0; i--) { shminfo.shmmax = shminfo.shmall * i; if (shminfo.shmmax >= shminfo.shmall) break; } - TUNABLE_INT_FETCH("kern.ipc.shmmin", &shminfo.shmmin); - TUNABLE_INT_FETCH("kern.ipc.shmmni", &shminfo.shmmni); - TUNABLE_INT_FETCH("kern.ipc.shmseg", &shminfo.shmseg); + TUNABLE_ULONG_FETCH("kern.ipc.shmmin", &shminfo.shmmin); + TUNABLE_ULONG_FETCH("kern.ipc.shmmni", &shminfo.shmmni); + TUNABLE_ULONG_FETCH("kern.ipc.shmseg", &shminfo.shmseg); TUNABLE_INT_FETCH("kern.ipc.shm_use_phys", &shm_use_phys); shmalloced = shminfo.shmmni; |