xref: /illumos-gate/usr/src/uts/common/sys/mmapobj.h (revision 79b24695)
1*0616c1c3SMichael Corcoran /*
2*0616c1c3SMichael Corcoran  * CDDL HEADER START
3*0616c1c3SMichael Corcoran  *
4*0616c1c3SMichael Corcoran  * The contents of this file are subject to the terms of the
5*0616c1c3SMichael Corcoran  * Common Development and Distribution License (the "License").
6*0616c1c3SMichael Corcoran  * You may not use this file except in compliance with the License.
7*0616c1c3SMichael Corcoran  *
8*0616c1c3SMichael Corcoran  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*0616c1c3SMichael Corcoran  * or http://www.opensolaris.org/os/licensing.
10*0616c1c3SMichael Corcoran  * See the License for the specific language governing permissions
11*0616c1c3SMichael Corcoran  * and limitations under the License.
12*0616c1c3SMichael Corcoran  *
13*0616c1c3SMichael Corcoran  * When distributing Covered Code, include this CDDL HEADER in each
14*0616c1c3SMichael Corcoran  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*0616c1c3SMichael Corcoran  * If applicable, add the following below this CDDL HEADER, with the
16*0616c1c3SMichael Corcoran  * fields enclosed by brackets "[]" replaced with your own identifying
17*0616c1c3SMichael Corcoran  * information: Portions Copyright [yyyy] [name of copyright owner]
18*0616c1c3SMichael Corcoran  *
19*0616c1c3SMichael Corcoran  * CDDL HEADER END
20*0616c1c3SMichael Corcoran  */
21*0616c1c3SMichael Corcoran /*
22*0616c1c3SMichael Corcoran  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*0616c1c3SMichael Corcoran  * Use is subject to license terms.
24*0616c1c3SMichael Corcoran  */
25*0616c1c3SMichael Corcoran 
26*0616c1c3SMichael Corcoran #ifndef _SYS_MMAPOBJ_H
27*0616c1c3SMichael Corcoran #define	_SYS_MMAPOBJ_H
28*0616c1c3SMichael Corcoran 
29*0616c1c3SMichael Corcoran #ifdef	__cplusplus
30*0616c1c3SMichael Corcoran extern "C" {
31*0616c1c3SMichael Corcoran #endif
32*0616c1c3SMichael Corcoran 
33*0616c1c3SMichael Corcoran /*
34*0616c1c3SMichael Corcoran  * Number of mmapobj_result_t structures created on stack for quick allocation.
35*0616c1c3SMichael Corcoran  * More will be manually kmem_alloc'ed if needed.
36*0616c1c3SMichael Corcoran  * Should be enough for most ELF objects.
37*0616c1c3SMichael Corcoran  */
38*0616c1c3SMichael Corcoran #define	LIBVA_CACHED_SEGS 3
39*0616c1c3SMichael Corcoran 
40*0616c1c3SMichael Corcoran #ifdef _KERNEL
41*0616c1c3SMichael Corcoran extern void mmapobj_unmap(mmapobj_result_t *, int, int, ushort_t);
42*0616c1c3SMichael Corcoran #endif
43*0616c1c3SMichael Corcoran 
44*0616c1c3SMichael Corcoran extern int mmapobj(vnode_t *, uint_t, mmapobj_result_t *, uint_t *, size_t,
45*0616c1c3SMichael Corcoran     cred_t *);
46*0616c1c3SMichael Corcoran 
47*0616c1c3SMichael Corcoran #ifdef	__cplusplus
48*0616c1c3SMichael Corcoran }
49*0616c1c3SMichael Corcoran #endif
50*0616c1c3SMichael Corcoran 
51*0616c1c3SMichael Corcoran #endif	/* _SYS_MMAPOBJ_H */
52