diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sysv_shm.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_map.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index f9c3d33..b83234d 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -263,7 +263,7 @@ shmdt(td, uap) if (!jail_sysvipc_allowed && jailed(td->td_ucred)) return (ENOSYS); mtx_lock(&Giant); - shmmap_s = (struct shmmap_state *)p->p_vmspace->vm_shm; + shmmap_s = p->p_vmspace->vm_shm; if (shmmap_s == NULL) { error = EINVAL; goto done2; @@ -314,7 +314,7 @@ shmat(td, uap) if (!jail_sysvipc_allowed && jailed(td->td_ucred)) return (ENOSYS); mtx_lock(&Giant); - shmmap_s = (struct shmmap_state *)p->p_vmspace->vm_shm; + shmmap_s = p->p_vmspace->vm_shm; if (shmmap_s == NULL) { size = shminfo.shmseg * sizeof(struct shmmap_state); shmmap_s = malloc(size, M_SHM, M_WAITOK); @@ -774,7 +774,7 @@ shmexit_myhook(p) GIANT_REQUIRED; - shmmap_s = (struct shmmap_state *)p->p_vmspace->vm_shm; + shmmap_s = p->p_vmspace->vm_shm; for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) if (shmmap_s->shmid != -1) shm_delete_mapping(p, shmmap_s); diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 2922245..0f9a056 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -205,7 +205,7 @@ struct vmspace { struct vm_map vm_map; /* VM address map */ struct pmap vm_pmap; /* private physical map */ int vm_refcnt; /* number of references */ - void *vm_shm; /* SYS5 shared memory private data XXX */ + struct shmmap_state *vm_shm; /* SYS5 shared memory private data XXX */ /* we copy from vm_startcopy to the end of the structure on fork */ #define vm_startcopy vm_rssize segsz_t vm_rssize; /* current resident set size in pages */ |