Synesis Software

unixem/sys/mman.h File Reference


Detailed Description

Contains the declarations for the mmap() API.

#include <unixem/sys/mman.h>
#include <stddef.h>
#include <sys/stat.h>
#include <sys/types.h>

Go to the source code of this file.

Defines

#define PROT_READ   (UNIXEM_PROT_READ)
#define PROT_WRITE   (UNIXEM_PROT_WRITE)
#define PROT_EXEC   (UNIXEM_PROT_EXEC)
#define PROT_NONE   (UNIXEM_PROT_NONE)
#define MAP_PRIVATE   (UNIXEM_MAP_PRIVATE)
#define MAP_ANONYMOUS   (UNIXEM_MAP_ANONYMOUS)
#define MAP_FIXED   (UNIXEM_MAP_FIXED)
#define MAP_FAILED   (UNIXEM_MAP_FAILED)
#define UNIXEM_PROT_READ   (0x01)
#define UNIXEM_PROT_WRITE   (0x02)
#define UNIXEM_PROT_EXEC   (0x04)
#define UNIXEM_PROT_NONE   (0x00)
#define UNIXEM_MAP_PRIVATE   (0x02)
#define UNIXEM_MAP_ANONYMOUS   (0x20)
#define UNIXEM_MAP_FIXED   (0x10)
#define UNIXEM_MAP_FAILED   ((void*)~0)

Functions

void * mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
 Maps a file into memory, and returns a pointer to it.
int munmap (void *addr, size_t len)
 Deletes a mapped region.
int msync (void *addr, size_t len, int flags)
 Writes any dirty pages within the given range to disk.
void * unixem_mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
 Maps a file into memory, and returns a pointer to it.
int unixem_munmap (void *addr, size_t len)
 Deletes a mapped region.
int unixem_msync (void *addr, size_t len, int flags)
 Writes any dirty pages within the given range to disk.


UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2010