mmap.h
Go to the documentation of this file.00001 #ifndef CTL_MMAP_H
00002 #define CTL_MMAP_H
00003
00009 ppCPP(extern "C" {)
00010
00015 typedef struct ctl_mmap
00016 {
00017 void* base;
00018 size_t size;
00019 #ifdef WIN32
00020 void* hFile;
00021 void* hMap;
00022 #else
00023 int fd;
00024 #endif
00025 } ctl_mmap;
00026 #define ctl_mmap_ptr(map) ((map)->base)
00027 #define ctl_mmap_size(map) ((map)->size)
00028 #define ctl_mmap_ready(map) (0 != (map)->size && 0 != (map)->base)
00029 const void* ctl_mmap_open( ctl_mmap* map, const char* szPath );
00030 void ctl_mmap_close( ctl_mmap* map );
00031
00032 ppCPP(})
00033
00034 #endif