src/dpdk/drivers/bus/vmbus/vmbus_common.c
void *
vmbus_map_resource(void *requested_addr, int fd, off_t offset, size_t size,
		   int flags)
{
	void *mapaddr;

	/* Map the memory resource of device */
	mapaddr = mmap(requested_addr, size, PROT_READ | PROT_WRITE,
		       MAP_SHARED | flags, fd, offset);
	if (mapaddr == MAP_FAILED) {
		VMBUS_LOG(ERR,
			  "mmap(%d, %p, %zu, %ld) failed: %s",
			  fd, requested_addr, size, (long)offset,
			  strerror(errno));
	}
	return mapaddr;
}
/* map a particular resource from a file */
map a particular resource from a file
map a particular resource from a file
void *
vmbus_map_resource(void *requested_addr, int fd, off_t offset, size_t size,
		   int flags)
{
	void *mapaddr;
	mapaddr = mmap(requested_addr, size, PROT_READ | PROT_WRITE,
		       MAP_SHARED | flags, fd, offset);
	if (mapaddr == MAP_FAILED) {
		VMBUS_LOG(ERR,
			  "mmap(%d, %p, %zu, %ld) failed: %s",
			  fd, requested_addr, size, (long)offset,
			  strerror(errno));
	}
	return mapaddr;
}
void * vmbus_map_resource ( void * requested_addr , int fd , off_t offset , size_t size , int flags ) { void * mapaddr ; mapaddr = mmap ( requested_addr , size , PROT_READ | PROT_WRITE , MAP_SHARED | flags , fd , offset ) ; if ( mapaddr == MAP_FAILED ) { VMBUS_LOG ( ERR , " " , fd , requested_addr , size , ( long ) offset , strerror ( errno ) ) ; } return mapaddr ; }
map a particular resource from a file
map a particular resource from a file
/* Map the memory resource of device */