summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/sysv_shm.c18
-rw-r--r--sys/sys/shm.h10
-rw-r--r--usr.bin/ipcs/ipcs.c10
3 files changed, 19 insertions, 19 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;
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index 0e6b86b..88eaf06 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -94,11 +94,11 @@ struct shmid_ds {
* might be of interest to user programs. Do we really want/need this?
*/
struct shminfo {
- int shmmax, /* max shared memory segment size (bytes) */
- shmmin, /* min shared memory segment size (bytes) */
- shmmni, /* max number of shared memory identifiers */
- shmseg, /* max shared memory segments per process */
- shmall; /* max amount of shared memory (pages) */
+ u_long shmmax; /* max shared memory segment size (bytes) */
+ u_long shmmin; /* max shared memory segment size (bytes) */
+ u_long shmmni; /* max number of shared memory identifiers */
+ u_long shmseg; /* max shared memory segments per process */
+ u_long shmall; /* max amount of shared memory (pages) */
};
/*
diff --git a/usr.bin/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c
index 5a1dbb0..cd2fe13 100644
--- a/usr.bin/ipcs/ipcs.c
+++ b/usr.bin/ipcs/ipcs.c
@@ -93,11 +93,11 @@ static struct nlist symbols[] = {
};
#define SHMINFO_XVEC \
-X(shmmax, sizeof(int)) \
-X(shmmin, sizeof(int)) \
-X(shmmni, sizeof(int)) \
-X(shmseg, sizeof(int)) \
-X(shmall, sizeof(int))
+X(shmmax, sizeof(u_long)) \
+X(shmmin, sizeof(u_long)) \
+X(shmmni, sizeof(u_long)) \
+X(shmseg, sizeof(u_long)) \
+X(shmall, sizeof(u_long))
#define SEMINFO_XVEC \
X(semmap, sizeof(int)) \
OpenPOWER on IntegriCloud