Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/mman.h
Show First 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
* Anonymous object constant for shm_open(). | * Anonymous object constant for shm_open(). | ||||
*/ | */ | ||||
#define SHM_ANON ((char *)1) | #define SHM_ANON ((char *)1) | ||||
/* | /* | ||||
* shmflags for shm_open2() | * shmflags for shm_open2() | ||||
*/ | */ | ||||
#define SHM_ALLOW_SEALING 0x00000001 | #define SHM_ALLOW_SEALING 0x00000001 | ||||
#define SHM_GROW_ON_WRITE 0x00000002 | |||||
/* | /* | ||||
* Flags for memfd_create(). | * Flags for memfd_create(). | ||||
*/ | */ | ||||
#define MFD_CLOEXEC 0x00000001 | #define MFD_CLOEXEC 0x00000001 | ||||
#define MFD_ALLOW_SEALING 0x00000002 | #define MFD_ALLOW_SEALING 0x00000002 | ||||
/* UNSUPPORTED */ | /* UNSUPPORTED */ | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | struct shmfd { | ||||
ino_t shm_ino; | ino_t shm_ino; | ||||
struct label *shm_label; /* MAC label */ | struct label *shm_label; /* MAC label */ | ||||
const char *shm_path; | const char *shm_path; | ||||
struct rangelock shm_rl; | struct rangelock shm_rl; | ||||
struct mtx shm_mtx; | struct mtx shm_mtx; | ||||
int shm_flags; | |||||
int shm_seals; | int shm_seals; | ||||
char *shm_name; /* Name, exposed via fdescfs. */ | char *shm_name; /* Name, exposed via fdescfs. */ | ||||
}; | }; | ||||
#endif | #endif | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
int shm_map(struct file *fp, size_t size, off_t offset, void **memp); | int shm_map(struct file *fp, size_t size, off_t offset, void **memp); | ||||
int shm_unmap(struct file *fp, void *mem, size_t size); | int shm_unmap(struct file *fp, void *mem, size_t size); | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |