ibcs2_ipc.c (160189) | ibcs2_ipc.c (194910) |
---|---|
1/*- 2 * Copyright (c) 1995 Scott Bartram 3 * Copyright (c) 1995 Steven Wallace 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1995 Scott Bartram 3 * Copyright (c) 1995 Steven Wallace 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_ipc.c 160189 2006-07-08 19:54:12Z jhb $"); | 27__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_ipc.c 194910 2009-06-24 21:10:52Z jhb $"); |
28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/msg.h> 32#include <sys/sem.h> 33#include <sys/shm.h> 34#include <sys/syscallsubr.h> 35#include <sys/sysproto.h> --- 374 unchanged lines hidden (view full) --- 410cvt_shmid2ishmid(bp, ibp) 411struct shmid_ds *bp; 412struct ibcs2_shmid_ds *ibp; 413{ 414 cvt_perm2iperm(&bp->shm_perm, &ibp->shm_perm); 415 ibp->shm_segsz = bp->shm_segsz; 416 ibp->shm_lpid = bp->shm_lpid; 417 ibp->shm_cpid = bp->shm_cpid; | 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/msg.h> 32#include <sys/sem.h> 33#include <sys/shm.h> 34#include <sys/syscallsubr.h> 35#include <sys/sysproto.h> --- 374 unchanged lines hidden (view full) --- 410cvt_shmid2ishmid(bp, ibp) 411struct shmid_ds *bp; 412struct ibcs2_shmid_ds *ibp; 413{ 414 cvt_perm2iperm(&bp->shm_perm, &ibp->shm_perm); 415 ibp->shm_segsz = bp->shm_segsz; 416 ibp->shm_lpid = bp->shm_lpid; 417 ibp->shm_cpid = bp->shm_cpid; |
418 ibp->shm_nattch = bp->shm_nattch; | 418 if (bp->shm_nattch > SHRT_MAX) 419 ibp->shm_nattch = SHRT_MAX; 420 else 421 ibp->shm_nattch = bp->shm_nattch; |
419 ibp->shm_cnattch = 0; /* ignored anyway */ 420 ibp->shm_atime = bp->shm_atime; 421 ibp->shm_dtime = bp->shm_dtime; 422 ibp->shm_ctime = bp->shm_ctime; 423 return; 424} 425 426static void --- 4 unchanged lines hidden (view full) --- 431 cvt_iperm2perm(&ibp->shm_perm, &bp->shm_perm); 432 bp->shm_segsz = ibp->shm_segsz; 433 bp->shm_lpid = ibp->shm_lpid; 434 bp->shm_cpid = ibp->shm_cpid; 435 bp->shm_nattch = ibp->shm_nattch; 436 bp->shm_atime = ibp->shm_atime; 437 bp->shm_dtime = ibp->shm_dtime; 438 bp->shm_ctime = ibp->shm_ctime; | 422 ibp->shm_cnattch = 0; /* ignored anyway */ 423 ibp->shm_atime = bp->shm_atime; 424 ibp->shm_dtime = bp->shm_dtime; 425 ibp->shm_ctime = bp->shm_ctime; 426 return; 427} 428 429static void --- 4 unchanged lines hidden (view full) --- 434 cvt_iperm2perm(&ibp->shm_perm, &bp->shm_perm); 435 bp->shm_segsz = ibp->shm_segsz; 436 bp->shm_lpid = ibp->shm_lpid; 437 bp->shm_cpid = ibp->shm_cpid; 438 bp->shm_nattch = ibp->shm_nattch; 439 bp->shm_atime = ibp->shm_atime; 440 bp->shm_dtime = ibp->shm_dtime; 441 bp->shm_ctime = ibp->shm_ctime; |
439 bp->shm_internal = (void *)0; /* ignored anyway */ | |
440 return; 441} 442 443struct ibcs2_shmat_args { 444 int what; 445 int shmid; 446 const void *shmaddr; 447 int shmflg; --- 110 unchanged lines hidden --- | 442 return; 443} 444 445struct ibcs2_shmat_args { 446 int what; 447 int shmid; 448 const void *shmaddr; 449 int shmflg; --- 110 unchanged lines hidden --- |