Searched defs:fds (Results 1 - 25 of 68) sorted by relevance

123

/external/valgrind/main/none/tests/
H A Dfdleak_pipe.c6 int fds[2]; local
10 DO( pipe(fds) );
H A Dfdleak_socketpair.c8 int fds[2]; local
12 DO( socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fds) );
H A Dsyscall-restart1.c18 int fds[2]; local
20 if (pipe(fds) == -1) {
43 close(fds[1]);
44 ret = read(fds[0], &ch, 1);
52 close(fds[0]);
56 if (write(fds[1], "x", 1) != -1 || errno != EPIPE)
H A Dsyscall-restart2.c18 int fds[2]; local
20 if (pipe(fds) == -1) {
43 close(fds[1]);
44 ret = read(fds[0], &ch, 1);
52 close(fds[0]);
56 write(fds[1], "x", 1);
/external/bluetooth/bluez/src/
H A Dppoll.h7 static inline int compat_ppoll(struct pollfd *fds, nfds_t nfds, argument
11 return poll(fds, nfds, -1);
13 return poll(fds, nfds, 500);
15 return poll(fds, nfds, timeout->tv_sec * 1000);
/external/dbus/bus/
H A Ddir-watch-dnotify.c40 static int fds[MAX_DIRS_TO_WATCH]; variable
70 fds[num_fds++] = fd;
86 if (close (fds[i]) != 0)
88 _dbus_verbose ("Error closing fd %d for config directory watch\n", fds[i]);
H A Ddir-watch-kqueue.c46 static int fds[MAX_DIRS_TO_WATCH]; variable
176 new_fds[i] = fds[j];
178 fds[j] = -1;
185 /* Any directory we find in "fds" with a nonzero fd must
190 if (fds[j] != -1)
192 close (fds[j]);
194 fds[j] = -1;
249 fds[i] = new_fds[i];
/external/openssh/openbsd-compat/regress/
H A Dclosefromtest.c39 int i, max, fds[NUM_OPENS]; local
43 if ((fds[i] = open("/dev/null", O_RDONLY)) == -1)
48 closefrom(fds[max]);
49 if (close(fds[max]) != -1)
54 if (read(fds[i], buf, sizeof(buf)) == -1)
57 /* should close all fds */
58 closefrom(fds[0]);
60 if (close(fds[i]) != -1)
/external/chromium/chrome/browser/
H A Dprocess_info_snapshot_mac_unittest.cc100 int fds[2]; local
101 PCHECK(pipe(fds) == 0);
103 fds_to_remap.push_back(std::make_pair(fds[1], 1));
115 PCHECK(HANDLE_EINTR(close(fds[1])) == 0);
120 PCHECK(HANDLE_EINTR(read(fds[0], buf, 1)) == 1);
135 PCHECK(HANDLE_EINTR(close(fds[0])) == 0);
/external/e2fsprogs/lib/
H A Dfpopen.c42 int fds[2]; local
92 if (pipe(fds) < 0)
101 close(fds[1]);
102 dup2(fds[0], 0);
104 close(fds[0]);
105 dup2(fds[1], 1);
107 dup2(fds[1], 2);
113 return fdopen(do_stdin ? fds[1] : fds[0], mode);
/external/openssh/openbsd-compat/
H A Dbsd-poll.c40 poll(struct pollfd *fds, nfds_t nfds, int timeout) argument
49 fd = fds[i].fd;
68 fd = fds[i].fd;
71 if (fds[i].events & POLLIN) {
75 if (fds[i].events & POLLOUT) {
93 fd = fds[i].fd;
94 fds[i].revents = 0;
98 fds[i].revents |= POLLIN;
101 fds[i].revents |= POLLOUT;
104 fds[
[all...]
/external/dbus/dbus/
H A Ddbus-server-unix.c151 int n, *fds; local
154 n = _dbus_listen_systemd_sockets (&fds, error);
163 *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL);
170 _dbus_close_socket (fds[i], NULL);
172 dbus_free (fds);
178 dbus_free (fds);
/external/qemu/
H A Dcompatfd.c75 int fds[2]; local
83 if (pipe(fds) == -1) {
88 qemu_set_cloexec(fds[0]);
89 qemu_set_cloexec(fds[1]);
92 info->fd = fds[1];
101 return fds[0];
H A Dcpus.c132 int fds[2]; local
134 err = pipe(fds);
138 err = fcntl_setfl(fds[0], O_NONBLOCK);
142 err = fcntl_setfl(fds[1], O_NONBLOCK);
146 qemu_set_fd_handler2(fds[0], NULL, qemu_event_read, NULL,
147 (void *)(unsigned long)fds[0]);
149 io_thread_fd = fds[1];
153 close(fds[0]);
154 close(fds[1]);
/external/bluetooth/glib/glib/
H A Dgpoll.c62 /* The poll() emulation on OS/X doesn't handle fds=NULL, nfds=0,
89 extern gint poll (struct pollfd *fds, guint nfsd, gint timeout);
94 * @fds: file descriptors to poll
95 * @nfds: the number of file descriptors in @fds
98 * Polls @fds, as with the poll() system call, but portably. (On
104 * Each element of @fds is a #GPollFD describing a single file
110 * On POSIX systems, the file descriptors in @fds can be any sort of
116 * Return value: the number of entries in @fds whose %revents fields
123 g_poll (GPollFD *fds, argument
127 return poll ((struct pollfd *)fds, nfd
135 poll_rest(gboolean poll_msgs, HANDLE *handles, gint nhandles, GPollFD *fds, guint nfds, gint timeout) argument
255 g_poll(GPollFD *fds, guint nfds, gint timeout) argument
375 g_poll(GPollFD *fds, guint nfds, gint timeout) argument
[all...]
/external/dhcpcd/
H A Dcontrol.c50 struct fd_list *fds = NULL; variable in typeref:struct:fd_list
57 for (l = fds; l != NULL; l = l->next) {
62 fds = l->next;
114 l->next = fds;
115 fds = l;
143 listen(fd, sizeof(fds)) == -1)
165 l = fds;
H A Deloop.c59 static struct pollfd *fds; variable in typeref:struct:pollfd
277 free(fds);
329 free(fds);
332 fds = xmalloc(sizeof(*fds) * fds_len);
336 fds[nfds].fd = e->fd;
337 fds[nfds].events = POLLIN;
338 fds[nfds].revents = 0;
341 n = poll(fds, nfds, msecs);
356 if (!(fds[
[all...]
/external/chromium/third_party/libevent/
H A Ddevpoll.c63 struct evdevpoll *fds; member in struct:devpollop
162 devpollop->fds = calloc(nfiles, sizeof(struct evdevpoll));
163 if (devpollop->fds == NULL) {
173 free(devpollop->fds);
191 struct evdevpoll *fds; local
198 fds = realloc(devpollop->fds, nfds * sizeof(struct evdevpoll));
199 if (fds == NULL) {
203 devpollop->fds = fds;
[all...]
H A Depoll.c65 struct evepoll *fds; member in struct:epollop
141 epollop->fds = calloc(INITIAL_NFILES, sizeof(struct evepoll));
142 if (epollop->fds == NULL) {
160 struct evepoll *fds; local
167 fds = realloc(epollop->fds, nfds * sizeof(struct evepoll));
168 if (fds == NULL) {
172 epollop->fds = fds;
173 memset(fds
[all...]
/external/dropbear/
H A Dcommon-session.c288 fd_set fds; local
297 FD_ZERO(&fds);
304 FD_SET(fd, &fds);
308 if (select(fd+1, &fds, NULL, NULL, &timeout) < 0) {
321 if (FD_ISSET(fd, &fds)) {
H A Dsvr-main.c113 fd_set fds; local
176 FD_ZERO(&fds);
183 FD_SET(listensocks[i], &fds);
189 FD_SET(childpipes[i], &fds);
194 val = select(maxsock+1, &fds, NULL, NULL, &seltimeout);
213 /* close fds which have been authed or closed - svr-auth.c handles
216 if (childpipes[i] >= 0 && FD_ISSET(childpipes[i], &fds)) {
234 if (!FD_ISSET(listensocks[i], &fds))
/external/libusb/libusb/os/
H A Ddarwin_usb.h130 int fds[2]; member in struct:darwin_device_handle_priv
/external/qemu/android/utils/
H A Dtempfile.c138 int fds[ MAX_ATEXIT_FDS ]; member in struct:__anon8966
145 t->fds[t->count++] = fd;
157 if (t->fds[nn] == fd) {
160 t->fds[nn] = t->fds[t->count];
170 close(t->fds[nn]);
/external/bluetooth/glib/tests/
H A Dtimeloop-basic.c24 my_pipe (int *fds) argument
26 if (pipe(fds) < 0)
H A Dtimeloop-closure.c22 int fds[2]; local
24 if (pipe(fds) < 0)
30 channels[0] = g_io_channel_unix_new (fds[0]);
31 channels[1] = g_io_channel_unix_new (fds[1]);

Completed in 1284 milliseconds

123