The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
mman.h File Reference

mmap protection and flag constants (kernel side). More...

Go to the source code of this file.

Macros

#define PROT_NONE   0x0
#define PROT_READ   0x1
#define PROT_WRITE   0x2
#define PROT_EXEC   0x4
#define MAP_SHARED   0x01
#define MAP_PRIVATE   0x02
#define MAP_ANONYMOUS   0x04
#define MAP_FIXED   0x10
#define MAP_FAILED   ((void *)-1)

Detailed Description

mmap protection and flag constants (kernel side).

these values are ABI: they must match the libc mirror in src/libc/include/sys/mman.h exactly, since userspace passes them across the SYS_mmap boundary. kept small and POSIX-shaped.

Macro Definition Documentation

◆ PROT_NONE

#define PROT_NONE   0x0

◆ PROT_READ

#define PROT_READ   0x1

◆ PROT_WRITE

#define PROT_WRITE   0x2

◆ PROT_EXEC

#define PROT_EXEC   0x4

◆ MAP_SHARED

#define MAP_SHARED   0x01

◆ MAP_PRIVATE

#define MAP_PRIVATE   0x02

◆ MAP_ANONYMOUS

#define MAP_ANONYMOUS   0x04

◆ MAP_FIXED

#define MAP_FIXED   0x10

◆ MAP_FAILED

#define MAP_FAILED   ((void *)-1)