Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mman.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024, Tenstorrent AI ULC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_ZEPHYR_POSIX_SYS_MMAN_H_
8#define ZEPHYR_INCLUDE_ZEPHYR_POSIX_SYS_MMAN_H_
9
10#include <stddef.h>
11#include <sys/types.h>
12
13#define PROT_NONE 0x0
14#define PROT_READ 0x1
15#define PROT_WRITE 0x2
16#define PROT_EXEC 0x4
17
18#define MAP_SHARED 0x1
19#define MAP_PRIVATE 0x2
20#define MAP_FIXED 0x4
21
22/* for Linux compatibility */
23#define MAP_ANONYMOUS 0x20
24
25#define MS_SYNC 0x0
26#define MS_ASYNC 0x1
27#define MS_INVALIDATE 0x2
28
29#define MAP_FAILED ((void *)-1)
30
31#define MCL_CURRENT 0
32#define MCL_FUTURE 1
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38int mlock(const void *addr, size_t len);
39int mlockall(int flags);
40void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off);
41int msync(void *addr, size_t length, int flags);
42int munlock(const void *addr, size_t len);
43int munlockall(void);
44int munmap(void *addr, size_t len);
45int shm_open(const char *name, int oflag, mode_t mode);
46int shm_unlink(const char *name);
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif /* ZEPHYR_INCLUDE_ZEPHYR_POSIX_SYS_MMAN_H_ */
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa off
Definition asm-macro-32-bit-gnu.h:17
__INTPTR_TYPE__ off_t
Definition types.h:36
unsigned int mode_t
Definition types.h:14
int munmap(void *addr, size_t len)
int munlockall(void)
int shm_open(const char *name, int oflag, mode_t mode)
int shm_unlink(const char *name)
int mlock(const void *addr, size_t len)
int msync(void *addr, size_t length, int flags)
void * mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off)
int munlock(const void *addr, size_t len)
int mlockall(int flags)
flags
Definition parser.h:96