Lines Matching refs:fd

51     int fd = open(DEVXEN "gntdev", O_RDWR|O_CLOEXEC);  in osdep_gnttab_open()  local
52 if ( fd == -1 ) in osdep_gnttab_open()
54 xgt->fd = fd; in osdep_gnttab_open()
60 if ( xgt->fd == -1 ) in osdep_gnttab_close()
63 return close(xgt->fd); in osdep_gnttab_close()
68 int fd = xgt->fd, rc; in osdep_gnttab_set_max_grants() local
71 rc = ioctl(fd, IOCTL_GNTDEV_SET_MAX_GRANTS, &max_grants); in osdep_gnttab_set_max_grants()
92 int fd = xgt->fd; in osdep_gnttab_grant_map() local
124 if ( ioctl(fd, IOCTL_GNTDEV_MAP_GRANT_REF, map) ) { in osdep_gnttab_grant_map()
130 addr = mmap(NULL, PAGE_SIZE * count, prot, MAP_SHARED, fd, in osdep_gnttab_grant_map()
164 rv = ioctl(fd, IOCTL_GNTDEV_SET_UNMAP_NOTIFY, &notify); in osdep_gnttab_grant_map()
181 ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant); in osdep_gnttab_grant_map()
197 int fd = xgt->fd; in osdep_gnttab_unmap() local
212 if ( (rc = ioctl(fd, IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR, in osdep_gnttab_unmap()
229 if ( (rc = ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant)) ) in osdep_gnttab_unmap()
240 int fd = xgt->fd; in osdep_gnttab_grant_copy() local
304 rc = ioctl(fd, IOCTL_GNTDEV_GRANT_COPY, &copy); in osdep_gnttab_grant_copy()
339 if ( (rc = ioctl(xgt->fd, IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS, from_refs)) ) in osdep_gnttab_dmabuf_exp_from_refs()
345 *dmabuf_fd = from_refs->fd; in osdep_gnttab_dmabuf_exp_from_refs()
354 uint32_t fd, uint32_t wait_to_ms) in osdep_gnttab_dmabuf_exp_wait_released() argument
359 wait.fd = fd; in osdep_gnttab_dmabuf_exp_wait_released()
362 if ( (rc = ioctl(xgt->fd, IOCTL_GNTDEV_DMABUF_EXP_WAIT_RELEASED, &wait)) ) in osdep_gnttab_dmabuf_exp_wait_released()
377 uint32_t fd, uint32_t count, uint32_t *refs) in osdep_gnttab_dmabuf_imp_to_refs() argument
396 to_refs->fd = fd; in osdep_gnttab_dmabuf_imp_to_refs()
400 if ( (rc = ioctl(xgt->fd, IOCTL_GNTDEV_DMABUF_IMP_TO_REFS, to_refs)) ) in osdep_gnttab_dmabuf_imp_to_refs()
414 int osdep_gnttab_dmabuf_imp_release(xengnttab_handle *xgt, uint32_t fd) in osdep_gnttab_dmabuf_imp_release() argument
419 release.fd = fd; in osdep_gnttab_dmabuf_imp_release()
421 if ( (rc = ioctl(xgt->fd, IOCTL_GNTDEV_DMABUF_IMP_RELEASE, &release)) ) in osdep_gnttab_dmabuf_imp_release()
429 int fd = open(DEVXEN "gntalloc", O_RDWR); in osdep_gntshr_open() local
430 if ( fd == -1 ) in osdep_gntshr_open()
432 xgs->fd = fd; in osdep_gntshr_open()
438 if ( xgs->fd == -1 ) in osdep_gntshr_close()
441 return close(xgs->fd); in osdep_gntshr_close()
453 int fd = xgs->fd; in osdep_gntshr_share_pages() local
463 err = ioctl(fd, IOCTL_GNTALLOC_ALLOC_GREF, gref_info); in osdep_gntshr_share_pages()
470 MAP_SHARED, fd, gref_info->index); in osdep_gntshr_share_pages()
489 err = ioctl(fd, IOCTL_GNTALLOC_SET_UNMAP_NOTIFY, &notify); in osdep_gntshr_share_pages()
504 ioctl(fd, IOCTL_GNTALLOC_DEALLOC_GREF, &gref_drop); in osdep_gntshr_share_pages()