| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // This file defines the flags for mmap_anonymous and mmap_file system calls. |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | typedef enum |
| 7 | { |
| 8 | MEM_PERM_NONE = 0, |
| 9 | MEM_PERM_READ = 1 << 0, // the memory is readable |
| 10 | MEM_PERM_WRITE = 1 << 1, // the memory is writable |
| 11 | MEM_PERM_EXEC = 1 << 2, // the memory is executable |
| 12 | } mem_perm_t; |
| 13 | |
| 14 | typedef enum |
| 15 | { |
| 16 | MMAP_EXACT = 1 << 0, // map the memory at the exact address specified |
| 17 | MMAP_PRIVATE = 1 << 1, // the memory is private, and will be CoWed when forking |
| 18 | MMAP_SHARED = 1 << 2, // the memory is shared when forking |
| 19 | } mmap_flags_t; |
| 20 | |