Lines Matching refs:fd
41 extern void minios_evtchn_close_fd(int fd);
46 static struct evtchn_port_info* port_alloc(int fd) { in port_alloc() argument
55 LIST_INSERT_HEAD(&files[fd].evtchn.ports, port_info, list); in port_alloc()
68 int fd = alloc_fd(FTYPE_EVTCHN); in osdep_evtchn_open() local
69 if ( fd == -1 ) in osdep_evtchn_open()
71 LIST_INIT(&files[fd].evtchn.ports); in osdep_evtchn_open()
72 xce->fd = fd; in osdep_evtchn_open()
73 printf("evtchn_open() -> %d\n", fd); in osdep_evtchn_open()
79 if ( xce->fd == -1 ) in osdep_evtchn_close()
82 return close(xce->fd); in osdep_evtchn_close()
91 void minios_evtchn_close_fd(int fd) in minios_evtchn_close_fd() argument
94 LIST_FOREACH_SAFE(port_info, &files[fd].evtchn.ports, list, tmp) in minios_evtchn_close_fd()
97 files[fd].type = FTYPE_NONE; in minios_evtchn_close_fd()
102 return xce->fd; in xenevtchn_fd()
120 int fd = (int)(intptr_t)data; in evtchn_handler() local
122 assert(files[fd].type == FTYPE_EVTCHN); in evtchn_handler()
124 LIST_FOREACH(port_info, &files[fd].evtchn.ports, list) { in evtchn_handler()
128 printk("Unknown port for handle %d\n", fd); in evtchn_handler()
133 files[fd].read = 1; in evtchn_handler()
139 int fd = xce->fd; in xenevtchn_bind_unbound_port() local
145 port_info = port_alloc(fd); in xenevtchn_bind_unbound_port()
150 ret = evtchn_alloc_unbound(domid, evtchn_handler, (void*)(intptr_t)fd, &port); in xenevtchn_bind_unbound_port()
167 int fd = xce->fd; in xenevtchn_bind_interdomain() local
173 port_info = port_alloc(fd); in xenevtchn_bind_interdomain()
178 …ret = evtchn_bind_interdomain(domid, remote_port, evtchn_handler, (void*)(intptr_t)fd, &local_port… in xenevtchn_bind_interdomain()
194 int fd = xce->fd; in xenevtchn_unbind() local
197 LIST_FOREACH(port_info, &files[fd].evtchn.ports, list) { in xenevtchn_unbind()
203 printf("Warning: couldn't find port %"PRId32" for xc handle %x\n", port, fd); in xenevtchn_unbind()
210 int fd = xce->fd; in xenevtchn_bind_virq() local
215 port_info = port_alloc(fd); in xenevtchn_bind_virq()
220 port = bind_virq(virq, evtchn_handler, (void*)(intptr_t)fd); in xenevtchn_bind_virq()
235 int fd = xce->fd; in xenevtchn_pending() local
241 files[fd].read = 0; in xenevtchn_pending()
243 LIST_FOREACH(port_info, &files[fd].evtchn.ports, list) { in xenevtchn_pending()
249 files[fd].read = 1; in xenevtchn_pending()