Lines Matching refs:fd
43 int fd = open(DEVXEN, O_RDWR|O_CLOEXEC); in osdep_gnttab_open() local
45 if ( fd == -1 ) in osdep_gnttab_open()
47 xgt->fd = fd; in osdep_gnttab_open()
54 if ( xgt->fd == -1 ) in osdep_gnttab_close()
57 return close(xgt->fd); in osdep_gnttab_close()
72 int fd = xgt->fd; in osdep_gnttab_grant_map() local
103 if ( ioctl(fd, IOCTL_GNTDEV_MAP_GRANT_REF, map) ) in osdep_gnttab_grant_map()
109 addr = mmap(NULL, PAGE_SIZE * count, prot, MAP_SHARED, fd, in osdep_gnttab_grant_map()
129 rv = ioctl(fd, IOCTL_GNTDEV_SET_UNMAP_NOTIFY, ¬ify); in osdep_gnttab_grant_map()
146 ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant); in osdep_gnttab_grant_map()
165 int fd = xgt->fd; in osdep_gnttab_unmap() local
180 if ( (rc = ioctl(fd, IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR, in osdep_gnttab_unmap()
197 if ( (rc = ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant)) ) in osdep_gnttab_unmap()
214 int fd = open(DEVXEN, O_RDWR); in osdep_gntshr_open() local
216 if ( fd == -1 ) in osdep_gntshr_open()
218 xgs->fd = fd; in osdep_gntshr_open()
225 if ( xgs->fd == -1 ) in osdep_gntshr_close()
228 return close(xgs->fd); in osdep_gntshr_close()
238 int fd = xgs->fd; in osdep_gntshr_share_pages() local
251 err = ioctl(fd, IOCTL_GNTDEV_ALLOC_GREF, gref_info); in osdep_gntshr_share_pages()
259 fd, gref_info->index); in osdep_gntshr_share_pages()
281 err = ioctl(fd, IOCTL_GNTDEV_SET_UNMAP_NOTIFY, ¬ify); in osdep_gntshr_share_pages()
298 ioctl(fd, IOCTL_GNTDEV_DEALLOC_GREF, &gref_drop); in osdep_gntshr_share_pages()