Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 154) sorted by relevance

1234567

/xen/tools/libs/evtchn/
A Dlinux.c40 if ( fd == -1 ) in osdep_evtchn_open()
42 xce->fd = fd; in osdep_evtchn_open()
48 if ( xce->fd == -1 ) in osdep_evtchn_close()
63 return xce->fd; in xenevtchn_fd()
68 int fd = xce->fd; in xenevtchn_notify() local
79 int fd = xce->fd; in xenevtchn_bind_unbound_port() local
91 int fd = xce->fd; in xenevtchn_bind_interdomain() local
103 int fd = xce->fd; in xenevtchn_bind_virq() local
113 int fd = xce->fd; in xenevtchn_unbind() local
123 int fd = xce->fd; in xenevtchn_pending() local
[all …]
A Dsolaris.c34 int fd; in osdep_evtchn_open() local
42 xce->fd = fd; in osdep_evtchn_open()
48 if ( xce->fd == -1 ) in osdep_evtchn_close()
62 return xce->fd; in xenevtchn_fd()
67 int fd = xce->fd; in xenevtchn_notify() local
77 int fd = xce->fd; in xenevtchn_bind_unbound_port() local
88 int fd = xce->fd; in xenevtchn_bind_interdomain() local
99 int fd = xce->fd; in xenevtchn_bind_virq() local
109 int fd = xce->fd; in xenevtchn_unbind() local
119 int fd = xce->fd; in xenevtchn_pending() local
[all …]
A Dnetbsd.c37 if ( fd == -1 ) in osdep_evtchn_open()
39 xce->fd = fd; in osdep_evtchn_open()
45 if ( xce->fd == -1 ) in osdep_evtchn_close()
59 return xce->fd; in xenevtchn_fd()
64 int fd = xce->fd; in xenevtchn_notify() local
74 int fd = xce->fd; in xenevtchn_bind_unbound_port() local
90 int fd = xce->fd; in xenevtchn_bind_interdomain() local
106 int fd = xce->fd; in xenevtchn_unbind() local
116 int fd = xce->fd; in xenevtchn_bind_virq() local
131 int fd = xce->fd; in xenevtchn_pending() local
[all …]
A Dfreebsd.c37 if ( fd == -1 ) in osdep_evtchn_open()
39 xce->fd = fd; in osdep_evtchn_open()
45 if ( xce->fd == -1 ) in osdep_evtchn_close()
59 return xce->fd; in xenevtchn_fd()
64 int fd = xce->fd; in xenevtchn_notify() local
74 int ret, fd = xce->fd; in xenevtchn_bind_unbound_port() local
86 int ret, fd = xce->fd; in xenevtchn_bind_interdomain() local
98 int ret, fd = xce->fd; in xenevtchn_bind_virq() local
109 int fd = xce->fd; in xenevtchn_unbind() local
119 int fd = xce->fd; in xenevtchn_pending() local
[all …]
A Dminios.c69 if ( fd == -1 ) in osdep_evtchn_open()
72 xce->fd = fd; in osdep_evtchn_open()
79 if ( xce->fd == -1 ) in osdep_evtchn_close()
102 return xce->fd; in xenevtchn_fd()
133 files[fd].read = 1; in evtchn_handler()
139 int fd = xce->fd; in xenevtchn_bind_unbound_port() local
167 int fd = xce->fd; in xenevtchn_bind_interdomain() local
194 int fd = xce->fd; in xenevtchn_unbind() local
210 int fd = xce->fd; in xenevtchn_bind_virq() local
236 int fd = xce->fd; in xenevtchn_pending() local
[all …]
/xen/tools/libs/gnttab/
A Dminios.c40 if ( fd == -1 ) in osdep_gnttab_open()
42 gntmap_init(&files[fd].gntmap); in osdep_gnttab_open()
43 xgt->fd = fd; in osdep_gnttab_open()
49 if ( xgt->fd == -1 ) in osdep_gnttab_close()
52 return close(xgt->fd); in osdep_gnttab_close()
55 void minios_gnttab_close_fd(int fd) in minios_gnttab_close_fd() argument
57 gntmap_fini(&files[fd].gntmap); in minios_gnttab_close_fd()
58 files[fd].type = FTYPE_NONE; in minios_gnttab_close_fd()
67 int fd = xgt->fd; in osdep_gnttab_grant_map() local
84 int fd = xgt->fd; in osdep_gnttab_unmap() local
[all …]
A Dlinux.c52 if ( fd == -1 ) in osdep_gnttab_open()
54 xgt->fd = fd; in osdep_gnttab_open()
68 int fd = xgt->fd, rc; in osdep_gnttab_set_max_grants() local
92 int fd = xgt->fd; in osdep_gnttab_grant_map() local
197 int fd = xgt->fd; in osdep_gnttab_unmap() local
240 int fd = xgt->fd; in osdep_gnttab_grant_copy() local
359 wait.fd = fd; in osdep_gnttab_dmabuf_exp_wait_released()
396 to_refs->fd = fd; in osdep_gnttab_dmabuf_imp_to_refs()
419 release.fd = fd; in osdep_gnttab_dmabuf_imp_release()
432 xgs->fd = fd; in osdep_gntshr_open()
[all …]
A Dfreebsd.c45 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
164 int fd = xgt->fd; in osdep_gnttab_unmap() local
215 if ( fd == -1 ) in osdep_gntshr_open()
217 xgs->fd = fd; in osdep_gntshr_open()
224 if ( xgs->fd == -1 ) in osdep_gntshr_close()
227 return close(xgs->fd); in osdep_gntshr_close()
[all …]
/xen/tools/xenstore/
A Dxenstored_posix.c34 int fd; in write_pidfile() local
37 if (fd == -1) in write_pidfile()
48 close(fd); in write_pidfile()
106 int fd; in xenbus_evtchn() local
112 if (fd == -1) in xenbus_evtchn()
119 close(fd); in xenbus_evtchn()
127 close(fd); in xenbus_evtchn()
133 int fd; in xenbus_map() local
137 if (fd == -1) in xenbus_map()
141 MAP_SHARED, fd, 0); in xenbus_map()
[all …]
A Dxenstored_solaris.c31 int fd; in xenbus_evtchn() local
34 fd = open("/dev/xen/xenbus", O_RDONLY); in xenbus_evtchn()
35 if (fd == -1) in xenbus_evtchn()
40 close(fd); in xenbus_evtchn()
46 int fd; in xenbus_map() local
49 fd = open("/dev/xen/xenbus", O_RDWR); in xenbus_map()
50 if (fd == -1) in xenbus_map()
54 MAP_SHARED, fd, 0); in xenbus_map()
59 close(fd); in xenbus_map()
66 int fd; in xenbus_notify_running() local
[all …]
/xen/tools/libs/call/
A Dsolaris.c32 int fd = open("/dev/xen/privcmd", O_RDWR); in osdep_xencall_open() local
34 if ( fd == -1 ) in osdep_xencall_open()
44 if ( (flags = fcntl(fd, F_GETFD)) < 0 ) in osdep_xencall_open()
50 if ( fcntl(fd, F_SETFD, flags) < 0 ) in osdep_xencall_open()
56 xcall->fd = fd; in osdep_xencall_open()
61 close(fd); in osdep_xencall_open()
68 int fd = xcall->fd; in osdep_xencall_close() local
69 return close(fd); in osdep_xencall_close()
85 int fd = xcall->fd; in do_xen_hypercall() local
86 return ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall); in do_xen_hypercall()
A Dnetbsd.c32 int fd = open("/kern/xen/privcmd", O_RDWR); in osdep_xencall_open() local
34 if ( fd == -1 ) in osdep_xencall_open()
44 if ( (flags = fcntl(fd, F_GETFD)) < 0 ) in osdep_xencall_open()
50 if ( fcntl(fd, F_SETFD, flags) < 0 ) in osdep_xencall_open()
56 xcall->fd = fd; in osdep_xencall_open()
61 close(fd); in osdep_xencall_open()
68 int fd = xcall->fd; in osdep_xencall_close() local
69 return close(fd); in osdep_xencall_close()
98 int fd = xcall->fd; in do_xen_hypercall() local
99 int error = ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall); in do_xen_hypercall()
A Dfreebsd.c38 int fd = open(PRIVCMD_DEV, O_RDWR|O_CLOEXEC); in osdep_xencall_open() local
46 if ( fd == -1 ) in osdep_xencall_open()
53 xcall->fd = fd; in osdep_xencall_open()
59 int fd = xcall->fd; in osdep_xencall_close() local
60 if ( fd == -1 ) in osdep_xencall_close()
62 return close(fd); in osdep_xencall_close()
67 int fd = xcall->fd; in osdep_hypercall() local
70 ret = ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall); in osdep_hypercall()
A Dlinux.c39 int fd; in osdep_xencall_open() local
44 fd = open("/dev/xen/privcmd", O_RDWR|O_CLOEXEC); in osdep_xencall_open()
49 fd = open("/proc/xen/privcmd", O_RDWR|O_CLOEXEC); in osdep_xencall_open()
52 if ( fd == -1 ) in osdep_xencall_open()
58 xcall->fd = fd; in osdep_xencall_open()
63 fd = open("/dev/xen/hypercall", O_RDWR|O_CLOEXEC); in osdep_xencall_open()
64 if ( fd == -1 && errno != ENOENT ) in osdep_xencall_open()
69 xcall->buf_fd = fd; in osdep_xencall_open()
78 if ( xcall->fd >= 0 ) in osdep_xencall_close()
79 close(xcall->fd); in osdep_xencall_close()
[all …]
/xen/tools/libs/foreignmemory/
A Dsolaris.c30 int fd = open("/dev/xen/privcmd", O_RDWR); in osdep_xenforeignmemory_open() local
32 if ( fd == -1 ) in osdep_xenforeignmemory_open()
42 if ( (flags = fcntl(fd, F_GETFD)) < 0 ) in osdep_xenforeignmemory_open()
48 if ( fcntl(fd, F_SETFD, flags) < 0 ) in osdep_xenforeignmemory_open()
54 fmem->fd = fd; in osdep_xenforeignmemory_open()
59 close(fd); in osdep_xenforeignmemory_open()
66 int fd = fmem->fd; in osdep_xenforeignmemory_close() local
67 return close(fd); in osdep_xenforeignmemory_close()
73 int fd = fmem->fd; in osdep_map_foreign_batch() local
75 addr = mmap(addr, num*XC_PAGE_SIZE, prot, flags | MAP_SHARED, fd, 0); in osdep_map_foreign_batch()
[all …]
A Dnetbsd.c29 int fd = open("/kern/xen/privcmd", O_RDWR); in osdep_xenforeignmemory_open() local
31 if ( fd == -1 ) in osdep_xenforeignmemory_open()
41 if ( (flags = fcntl(fd, F_GETFD)) < 0 ) in osdep_xenforeignmemory_open()
47 if ( fcntl(fd, F_SETFD, flags) < 0 ) in osdep_xenforeignmemory_open()
53 fmem->fd = fd; in osdep_xenforeignmemory_open()
58 close(fd); in osdep_xenforeignmemory_open()
65 int fd = fmem->fd; in osdep_xenforeignmemory_close() local
66 return close(fd); in osdep_xenforeignmemory_close()
73 int fd = fmem->fd; in osdep_map_foreign_batch() local
85 if ( ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 ) in osdep_map_foreign_batch()
A Dfreebsd.c36 int fd = open(PRIVCMD_DEV, O_RDWR|O_CLOEXEC); in osdep_xenforeignmemory_open() local
38 if ( fd == -1 ) in osdep_xenforeignmemory_open()
45 fmem->fd = fd; in osdep_xenforeignmemory_open()
51 int fd = fmem->fd; in osdep_xenforeignmemory_close() local
52 if ( fd == -1 ) in osdep_xenforeignmemory_close()
54 return close(fd); in osdep_xenforeignmemory_close()
62 int fd = fmem->fd; in osdep_xenforeignmemory_map() local
66 addr = mmap(addr, num << PAGE_SHIFT, prot, flags | MAP_SHARED, fd, 0); in osdep_xenforeignmemory_map()
79 rc = ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx); in osdep_xenforeignmemory_map()
A Dlinux.c39 int fd; in osdep_xenforeignmemory_open() local
42 fd = open("/dev/xen/privcmd", O_RDWR|O_CLOEXEC); in osdep_xenforeignmemory_open()
47 fd = open("/proc/xen/privcmd", O_RDWR|O_CLOEXEC); in osdep_xenforeignmemory_open()
50 if ( fd == -1 ) in osdep_xenforeignmemory_open()
65 close(fd); in osdep_xenforeignmemory_open()
74 fmem->fd = fd; in osdep_xenforeignmemory_open()
80 int fd = fmem->fd; in osdep_xenforeignmemory_close() local
81 if (fd == -1) in osdep_xenforeignmemory_close()
83 return close(fd); in osdep_xenforeignmemory_close()
167 int fd = fmem->fd; in osdep_xenforeignmemory_map() local
[all …]
/xen/tools/libs/devicemodel/
A Dlinux.c40 int fd = open("/dev/xen/privcmd", O_RDWR | O_CLOEXEC); in osdep_xendevicemodel_open() local
44 if (fd < 0) { in osdep_xendevicemodel_open()
65 rc = ioctl(fd, IOCTL_PRIVCMD_DM_OP, &uop); in osdep_xendevicemodel_open()
67 close(fd); in osdep_xendevicemodel_open()
68 fd = -1; in osdep_xendevicemodel_open()
72 dmod->fd = fd; in osdep_xendevicemodel_open()
78 if (dmod->fd < 0) in osdep_xendevicemodel_close()
81 return close(dmod->fd); in osdep_xendevicemodel_close()
93 if (dmod->fd < 0) in osdep_xendevicemodel_op()
109 rc = ioctl(dmod->fd, IOCTL_PRIVCMD_DM_OP, &uop); in osdep_xendevicemodel_op()
[all …]
/xen/tools/xenpaging/
A Dfile_ops.c25 static int file_op(int fd, void *page, int i, in file_op() argument
32 offset = lseek(fd, offset << PAGE_SHIFT, SEEK_SET); in file_op()
38 bytes = fn(fd, page + total, PAGE_SIZE - total); in file_op()
48 static ssize_t my_write(int fd, void *buf, size_t count) in my_write() argument
50 return write(fd, buf, count); in my_write()
53 int read_page(int fd, void *page, int i) in read_page() argument
55 return file_op(fd, page, i, &read); in read_page()
58 int write_page(int fd, void *page, int i) in write_page() argument
60 return file_op(fd, page, i, &my_write); in write_page()
/xen/tools/console/client/
A Dmain.c192 if (fd != -1) FD_SET(fd, &fds); in console_loop()
193 if (fd > max_fd) max_fd = fd; in console_loop()
206 close(fd); in console_loop()
210 fd = newfd; in console_loop()
233 fd = -1; in console_loop()
238 if (fd != -1 && FD_ISSET(fd, &fds)) { in console_loop()
249 fd = -1; in console_loop()
284 int fd; in console_lock() local
290 if (fd < 0) in console_lock()
309 close(fd); in console_lock()
[all …]
/xen/tools/libxl/
A Dtest_fdderegrace.c14 int fd = open("/dev/null", O_RDONLY); in main() local
15 assert(fd > 0); in main()
17 rc = libxl_test_fdevent(ctx, fd, POLLIN, &how); in main()
32 close(fd); in main()
37 if (poll_fds[i].fd == fd && (poll_fds[i].revents & POLLNVAL)) { in main()
39 fd, i); in main()
47 assert(fd2 == fd); in main()
50 rc = libxl_test_fdevent(ctx, fd, POLLIN, &how); in main()
/xen/tools/console/daemon/
A Dutils.c49 int fd; in daemonize() local
69 if ((fd = open("/dev/null",O_RDWR)) == -1) { in daemonize()
75 dup2(fd, i); in daemonize()
78 close(fd); in daemonize()
84 fd = open(pidfile, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR); in daemonize()
85 if (fd == -1) { in daemonize()
89 if (lockf(fd, F_TLOCK, 0) == -1) { in daemonize()
94 if (write(fd, buf, len) < 0) in daemonize()
101 close(fd); in daemonize()
/xen/tools/libxc/
A Dxc_minios.c38 void minios_interface_close_fd(int fd);
40 extern void minios_interface_close_fd(int fd);
42 void minios_interface_close_fd(int fd) in minios_interface_close_fd() argument
44 files[fd].type = FTYPE_NONE; in minios_interface_close_fd()
48 void discard_file_cache(xc_interface *xch, int fd, int flush) in discard_file_cache() argument
51 fsync(fd); in discard_file_cache()
/xen/tools/libvchan/
A Dvchan-socket-proxy.c147 int fd; in connect_socket() local
154 return fd; in connect_socket()
164 if (fd == -1) { in connect_socket()
173 close(fd); in connect_socket()
179 return fd; in connect_socket()
183 int fd; in listen_socket() local
189 return fd; in listen_socket()
200 if (fd == -1) { in listen_socket()
209 close(fd); in listen_socket()
214 close(fd); in listen_socket()
[all …]

Completed in 36 milliseconds

1234567