summaryrefslogtreecommitdiff
path: root/src/win32/mmap.h
blob: 1f2e756cb8392f660e3a98b5db82a72373d6bc6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef STLINK_MMAP_H
#define STLINK_MMAP_H

#ifdef STLINK_HAVE_SYS_MMAN_H
#include <sys/mman.h>
#else

#define PROT_READ     (1 << 0)
#define PROT_WRITE    (1 << 1)

#define MAP_SHARED    (1 << 0)
#define MAP_PRIVATE   (1 << 1)
#define MAP_ANONYMOUS (1 << 5)
#define MAP_FAILED    ((void *)-1)

#ifdef __cplusplus
extern "C" {
#endif

void *mmap(void *addr, size_t len, int prot, int flags, int fd, long long offset);
int munmap(void *addr, size_t len);

#ifdef __cplusplus
}
#endif

#endif /* HAVE_SYS_MMAN_H */

#endif /* STLINK_MMAP_H */