Coda Distributed File System
Macros
coda_mmap_anon.h File Reference
#include <unistd.h>
#include <sys/mman.h>
Include dependency graph for coda_mmap_anon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAP_ANON   0
 
#define mmap_anon(raddrptr, addrptr, len, prot)
 

Macro Definition Documentation

◆ MAP_ANON

#define MAP_ANON   0

◆ mmap_anon

#define mmap_anon (   raddrptr,
  addrptr,
  len,
  prot 
)
Value:
do { \
int fd = -1, flags = MAP_ANON | MAP_PRIVATE; \
if (addrptr) \
flags |= MAP_FIXED; \
if (!MAP_ANON) \
fd = open("/dev/zero", O_RDWR); \
raddrptr = mmap((char *)addrptr, len, prot, flags, fd, 0); \
if (fd != -1) \
close(fd); \
} while (0);
#define MAP_ANON
Definition: coda_mmap_anon.h:25