sysv_shm.c (35694) | sysv_shm.c (38517) |
---|---|
1/* $Id: sysv_shm.c,v 1.36 1998/05/04 03:01:37 dyson Exp $ */ | 1/* $Id: sysv_shm.c,v 1.37 1998/05/04 17:12:47 dyson Exp $ */ |
2/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ 3 4/* 5 * Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 488 unchanged lines hidden (view full) --- 498 499 /* 500 * We make sure that we have allocated a pager before we need 501 * to. 502 */ 503 shm_handle->shm_object = 504 vm_pager_allocate(OBJT_SWAP, 0, OFF_TO_IDX(size), 505 VM_PROT_DEFAULT, 0); | 2/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ 3 4/* 5 * Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: --- 488 unchanged lines hidden (view full) --- 498 499 /* 500 * We make sure that we have allocated a pager before we need 501 * to. 502 */ 503 shm_handle->shm_object = 504 vm_pager_allocate(OBJT_SWAP, 0, OFF_TO_IDX(size), 505 VM_PROT_DEFAULT, 0); |
506 shm_handle->shm_object->flags &= ~OBJ_ONEMAPPING; 507 shm_handle->shm_object->flags |= OBJ_NOSPLIT; | 506 vm_object_clear_flag(shm_handle->shm_object, OBJ_ONEMAPPING); 507 vm_object_set_flag(shm_handle->shm_object, OBJ_NOSPLIT); |
508 509 shmseg->shm_internal = shm_handle; 510 shmseg->shm_perm.cuid = shmseg->shm_perm.uid = cred->cr_uid; 511 shmseg->shm_perm.cgid = shmseg->shm_perm.gid = cred->cr_gid; 512 shmseg->shm_perm.mode = (shmseg->shm_perm.mode & SHMSEG_WANTED) | 513 (mode & ACCESSPERMS) | SHMSEG_ALLOCATED; 514 shmseg->shm_segsz = uap->size; 515 shmseg->shm_cpid = p->p_pid; --- 102 unchanged lines hidden --- | 508 509 shmseg->shm_internal = shm_handle; 510 shmseg->shm_perm.cuid = shmseg->shm_perm.uid = cred->cr_uid; 511 shmseg->shm_perm.cgid = shmseg->shm_perm.gid = cred->cr_gid; 512 shmseg->shm_perm.mode = (shmseg->shm_perm.mode & SHMSEG_WANTED) | 513 (mode & ACCESSPERMS) | SHMSEG_ALLOCATED; 514 shmseg->shm_segsz = uap->size; 515 shmseg->shm_cpid = p->p_pid; --- 102 unchanged lines hidden --- |