diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-14 16:03:38 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-14 19:58:11 +0200 |
commit | a8d1c2dde9cc8849ca18ec2c66631c5166d779e8 (patch) | |
tree | f11b577d1ee15539be2a1bd8ef674246b82245dc /Kernel/API/POSIX | |
parent | 0a78056453578c18e0a04a0b45ebfb1c96d59005 (diff) | |
download | serenity-a8d1c2dde9cc8849ca18ec2c66631c5166d779e8.zip |
Kernel+LibC: Share definitions for sys/mman.h
Diffstat (limited to 'Kernel/API/POSIX')
-rw-r--r-- | Kernel/API/POSIX/sys/mman.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Kernel/API/POSIX/sys/mman.h b/Kernel/API/POSIX/sys/mman.h new file mode 100644 index 0000000000..3c996e9699 --- /dev/null +++ b/Kernel/API/POSIX/sys/mman.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <Kernel/API/POSIX/sys/types.h> +#include <Kernel/API/POSIX/time.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define MAP_FILE 0x00 +#define MAP_SHARED 0x01 +#define MAP_PRIVATE 0x02 +#define MAP_FIXED 0x10 +#define MAP_ANONYMOUS 0x20 +#define MAP_ANON MAP_ANONYMOUS +#define MAP_STACK 0x40 +#define MAP_NORESERVE 0x80 +#define MAP_RANDOMIZED 0x100 +#define MAP_PURGEABLE 0x200 + +#define PROT_READ 0x1 +#define PROT_WRITE 0x2 +#define PROT_EXEC 0x4 +#define PROT_NONE 0x0 + +#define MAP_FAILED ((void*)-1) + +#define MADV_SET_VOLATILE 0x100 +#define MADV_SET_NONVOLATILE 0x200 + +#ifdef __cplusplus +} +#endif |