flags = is_private ? MAP_PRIVATE : MAP_SHARED;
COMPQUIET(path, NULL);   flags = is_rdonly ? MAP_PRIVATE : MAP_SHARED;  if (is_region && is_anonymous) {  #ifdef MAP_ANON flags |= MAP_ANON; #endif #ifdef MAP_ANONYMOUS flags |= MAP_ANONYMOUS; #endif fd = -1; } #ifdef MAP_FILE if (!is_region || !is_anonymous) {  flags |= MAP_FILE; } #endif
__os_map(fd, len, is_private, is_rdonly, addr)	int fd, is_private, is_rdonly;	size_t len;	void **addr;{	void *p;	int flags, prot;	flags = is_private ? MAP_PRIVATE : MAP_SHARED;#ifdef MAP_HASSEMAPHORE	flags |= MAP_HASSEMAPHORE;#endif	prot = PROT_READ | (is_rdonly ? 0 : PROT_WRITE);#ifndef MAP_FAILED			/* XXX: Mmap(2) failure return. */#define	MAP_FAILED	-1#endif	if ((p =	    mmap(NULL, len, prot, flags, fd, (off_t)0)) == (void *)MAP_FAILED)		return (errno);	*addr = p;	return (0);}