diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-05 20:57:05 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-05 20:57:05 +0000 |
commit | 368552036fe6029364e1abc2351955db681286fc (patch) | |
tree | b3e9a57702ccbbcd0869d57d84ba28c1e1033e05 /sys/kern/sysv_shm.c | |
parent | e64b8c0b9c88452904cfa97be25cfec4e21e04ce (diff) |
Get rid of CLSIZE and all related stuff.
CLSIZE -> 1
CLBYTES -> PAGE_SIZE
OLOFSET -> PAGE_MASK
etc.
At the same time some archs needed some cleaning in vmparam.h so that
goes in at the same time.
Diffstat (limited to 'sys/kern/sysv_shm.c')
-rw-r--r-- | sys/kern/sysv_shm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 4b558da6266..8ed48c24843 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_shm.c,v 1.14 1999/11/25 13:41:30 art Exp $ */ +/* $OpenBSD: sysv_shm.c,v 1.15 2001/05/05 20:57:00 art Exp $ */ /* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */ /* @@ -136,7 +136,7 @@ shm_deallocate_segment(shmseg) size_t size; shm_handle = shmseg->shm_internal; - size = (shmseg->shm_segsz + CLOFSET) & ~CLOFSET; + size = round_page(shmseg->shm_segsz); #ifdef UVM uao_detach(shm_handle->shm_object); #else @@ -160,7 +160,7 @@ shm_delete_mapping(vm, shmmap_s) segnum = IPCID_TO_IX(shmmap_s->shmid); shmseg = &shmsegs[segnum]; - size = (shmseg->shm_segsz + CLOFSET) & ~CLOFSET; + size = round_page(shmseg->shm_segsz); #ifdef UVM result = uvm_deallocate(&vm->vm_map, shmmap_s->va, size); #else @@ -247,7 +247,7 @@ sys_shmat(p, v, retval) } if (i >= shminfo.shmseg) return EMFILE; - size = (shmseg->shm_segsz + CLOFSET) & ~CLOFSET; + size = round_page(shmseg->shm_segsz); prot = VM_PROT_READ; if ((SCARG(uap, shmflg) & SHM_RDONLY) == 0) prot |= VM_PROT_WRITE; @@ -423,7 +423,7 @@ shmget_allocate_segment(p, uap, mode, retval) return EINVAL; if (shm_nused >= shminfo.shmmni) /* any shmids left? */ return ENOSPC; - size = (SCARG(uap, size) + CLOFSET) & ~CLOFSET; + size = round_page(SCARG(uap, size)); if (shm_committed + btoc(size) > shminfo.shmall) return ENOMEM; if (shm_last_free < 0) { |