4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984 AT&T */
28 /* All Rights Reserved */
33 #pragma ident "%Z%%M% %I% %E% SMI"
36 * IPC Shared Memory Facility.
39 #include <sys/param.h>
40 /* #include <machine/mmu.h> */
43 * Shared Memory Operation Flags.
46 #define SHM_RDONLY 010000 /* attach read-only (else read-write) */
47 #define SHM_RND 020000 /* round attach address to SHMLBA */
50 * Shmctl Command Definitions.
53 #define SHM_LOCK 3 /* Lock segment in core */
54 #define SHM_UNLOCK 4 /* Unlock segment */
57 * Implementation Constants.
59 #define SHMLBA PAGESIZE /* segment low boundary address multiple */
60 /* (SHMLBA must be a power of 2) */
63 * Structure Definitions.
67 * There is a shared mem id data structure for each segment in the system.
71 struct ipc_perm shm_perm
; /* operation permission struct */
72 uint shm_segsz
; /* size of segment in bytes */
73 ushort shm_lpid
; /* pid of last shmop */
74 ushort shm_cpid
; /* pid of creator */
75 ushort shm_nattch
; /* number of current attaches */
76 time_t shm_atime
; /* last shmat time */
77 time_t shm_dtime
; /* last shmdt time */
78 time_t shm_ctime
; /* last change time */
79 struct anon_map
*shm_amp
; /* segment anon_map pointer */
82 #endif /* !_sys_shm_h */