diff options
Diffstat (limited to 'sys/sys/mman.h')
-rw-r--r-- | sys/sys/mman.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/sys/sys/mman.h b/sys/sys/mman.h index 0f7416f..c6b8d42 100644 --- a/sys/sys/mman.h +++ b/sys/sys/mman.h @@ -139,6 +139,11 @@ #define MINCORE_MODIFIED 0x4 /* Page has been modified by us */ #define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */ #define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */ + +/* + * Anonymous object constant for shm_open(). + */ +#define SHM_ANON ((char *)1) #endif /* __BSD_VISIBLE */ /* @@ -168,7 +173,33 @@ typedef __size_t size_t; #define _SIZE_T_DECLARED #endif -#ifndef _KERNEL +#ifdef _KERNEL +#include <vm/vm.h> + +struct shmfd { + size_t shm_size; + vm_object_t shm_object; + int shm_refs; + uid_t shm_uid; + gid_t shm_gid; + mode_t shm_mode; + + /* + * Values maintained solely to make this a better-behaved file + * descriptor for fstat() to run on. + */ + struct timespec shm_atime; + struct timespec shm_mtime; + struct timespec shm_ctime; + struct timespec shm_birthtime; + + struct label *shm_label; /* MAC label */ +}; + +int shm_mmap(struct shmfd *shmfd, vm_size_t objsize, vm_ooffset_t foff, + vm_object_t *obj); + +#else /* !_KERNEL */ __BEGIN_DECLS /* |