mman.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1989 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef _sys_mman_h
#define _sys_mman_h
/*
* Protections are chosen from these bits, or-ed together.
* Note - not all implementations literally provide all possible
* combinations. PROT_WRITE is often implemented as (PROT_READ |
* PROT_WRITE) and (PROT_EXECUTE as PROT_READ | PROT_EXECUTE).
* However, no implementation will permit a write to succeed
* where PROT_WRITE has not been set. Also, no implementation will
* allow any access to succeed where prot is specified as PROT_NONE.
*/
#ifdef KERNEL
#endif KERNEL
/* sharing types: must choose either SHARED or PRIVATE */
/* other flags to mmap (or-ed in to MAP_SHARED or MAP_PRIVATE) */
/* these flags not yet implemented */
#ifdef notdef
/*
* Not clear that this flag will ever be implemented
*/
#endif notdef
/*
* For the sake of backward object compatibility, we use the _MAP_NEW flag.
* This flag will be automatically or'ed in by the C library for all
* new mmap calls. Previous binaries with old mmap calls with continue
* to get 0 or -1 for return values. New mmap calls will get the mapped
* address as the return value if successful and -1 on errors. By default,
* new mmap calls automatically have the kernel assign the map address
* unless the MAP_FIXED flag is given.
*/
/*
* Except for old binaries mmap() will return the resultant
* address of mapping on success and (caddr_t)-1 on error.
*/
/* advice to madvise */
#define MADV_NORMAL 0 /* no further special treatment */
/* flags to msync */
/* functions to mctl */
/* flags to mlockall */
#endif /*!_sys_mman_h*/