2018-10-24 10:48:24 +03:00
|
|
|
#pragma once
|
|
|
|
|
2018-10-31 04:09:11 +03:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <sys/types.h>
|
2018-10-24 10:48:24 +03:00
|
|
|
|
2018-11-08 13:37:01 +03:00
|
|
|
#define MAP_SHARED 0x01
|
|
|
|
#define MAP_PRIVATE 0x02
|
|
|
|
#define MAP_FIXED 0x10
|
|
|
|
#define MAP_ANONYMOUS 0x20
|
|
|
|
#define MAP_ANON MAP_ANONYMOUS
|
|
|
|
|
|
|
|
#define PROT_READ 0x1
|
|
|
|
#define PROT_WRITE 0x2
|
|
|
|
#define PROT_EXEC 0x4
|
|
|
|
#define PROT_NONE 0x0
|
|
|
|
|
2018-11-08 14:59:16 +03:00
|
|
|
#define MAP_FAILED ((void*)-1)
|
|
|
|
|
2018-10-31 04:09:11 +03:00
|
|
|
__BEGIN_DECLS
|
2018-10-24 10:48:24 +03:00
|
|
|
|
2018-11-08 13:37:01 +03:00
|
|
|
void* mmap(void* addr, size_t, int prot, int flags, int fd, off_t);
|
2018-10-24 10:48:24 +03:00
|
|
|
int munmap(void*, size_t);
|
2018-10-28 11:57:22 +03:00
|
|
|
int set_mmap_name(void*, size_t, const char*);
|
2019-04-09 00:44:12 +03:00
|
|
|
int shm_open(const char* name, int flags, mode_t);
|
|
|
|
int shm_unlink(const char* name);
|
2018-10-24 10:48:24 +03:00
|
|
|
|
2018-10-31 04:09:11 +03:00
|
|
|
__END_DECLS
|
|
|
|
|