mman.h (211937) | mman.h (228509) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)mman.h 8.2 (Berkeley) 1/9/95 | 1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)mman.h 8.2 (Berkeley) 1/9/95 |
30 * $FreeBSD: head/sys/sys/mman.h 211937 2010-08-28 16:57:07Z alc $ | 30 * $FreeBSD: head/sys/sys/mman.h 228509 2011-12-14 22:22:19Z jhb $ |
31 */ 32 33#ifndef _SYS_MMAN_H_ 34#define _SYS_MMAN_H_ 35 36#include <sys/cdefs.h> 37#include <sys/_types.h> 38 --- 137 unchanged lines hidden (view full) --- 176#ifndef _SIZE_T_DECLARED 177typedef __size_t size_t; 178#define _SIZE_T_DECLARED 179#endif 180 181#ifdef _KERNEL 182#include <vm/vm.h> 183 | 31 */ 32 33#ifndef _SYS_MMAN_H_ 34#define _SYS_MMAN_H_ 35 36#include <sys/cdefs.h> 37#include <sys/_types.h> 38 --- 137 unchanged lines hidden (view full) --- 176#ifndef _SIZE_T_DECLARED 177typedef __size_t size_t; 178#define _SIZE_T_DECLARED 179#endif 180 181#ifdef _KERNEL 182#include <vm/vm.h> 183 |
184struct file; 185 |
|
184struct shmfd { 185 size_t shm_size; 186 vm_object_t shm_object; 187 int shm_refs; 188 uid_t shm_uid; 189 gid_t shm_gid; 190 mode_t shm_mode; | 186struct shmfd { 187 size_t shm_size; 188 vm_object_t shm_object; 189 int shm_refs; 190 uid_t shm_uid; 191 gid_t shm_gid; 192 mode_t shm_mode; |
193 int shm_kmappings; |
|
191 192 /* 193 * Values maintained solely to make this a better-behaved file 194 * descriptor for fstat() to run on. 195 */ 196 struct timespec shm_atime; 197 struct timespec shm_mtime; 198 struct timespec shm_ctime; 199 struct timespec shm_birthtime; 200 201 struct label *shm_label; /* MAC label */ 202}; 203 204int shm_mmap(struct shmfd *shmfd, vm_size_t objsize, vm_ooffset_t foff, 205 vm_object_t *obj); | 194 195 /* 196 * Values maintained solely to make this a better-behaved file 197 * descriptor for fstat() to run on. 198 */ 199 struct timespec shm_atime; 200 struct timespec shm_mtime; 201 struct timespec shm_ctime; 202 struct timespec shm_birthtime; 203 204 struct label *shm_label; /* MAC label */ 205}; 206 207int shm_mmap(struct shmfd *shmfd, vm_size_t objsize, vm_ooffset_t foff, 208 vm_object_t *obj); |
209int shm_map(struct file *fp, size_t size, off_t offset, void **memp); 210int shm_unmap(struct file *fp, void *mem, size_t size); |
|
206 207#else /* !_KERNEL */ 208 209__BEGIN_DECLS 210/* 211 * XXX not yet implemented: posix_mem_offset(), posix_typed_mem_get_info(), 212 * posix_typed_mem_open(). 213 */ --- 29 unchanged lines hidden --- | 211 212#else /* !_KERNEL */ 213 214__BEGIN_DECLS 215/* 216 * XXX not yet implemented: posix_mem_offset(), posix_typed_mem_get_info(), 217 * posix_typed_mem_open(). 218 */ --- 29 unchanged lines hidden --- |