/external/strace/tests/ |
D | xselect.c | 50 int fds[2]; in main() local 59 if (pipe(fds)) in main() 66 FD_SET(fds[0], set); in main() 67 FD_SET(fds[1], set); in main() 68 if (syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL) != 1) in main() 71 TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], in main() 72 fds[0], fds[1], fds[0], fds[1]); in main() 79 FD_SET(fds[0], set); in main() 80 FD_SET(fds[1], set); in main() 81 if (syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) != 3) in main() [all …]
|
D | pselect6.c | 54 int fds[2]; in main() local 70 if (pipe(fds)) in main() 76 FD_SET(fds[0], set[0]); in main() 77 FD_SET(fds[1], set[0]); in main() 78 FD_SET(fds[0], set[1]); in main() 79 FD_SET(fds[1], set[1]); in main() 82 if (pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL) != 1) in main() 86 fds[1] + 1, fds[0], fds[1], in main() 87 fds[0], fds[1], in main() 88 NSIG / 8, fds[1]); in main() [all …]
|
D | ppoll.c | 41 struct pollfd fds[] = { in test1() local 52 return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 2 ? 0 : 77; in test1() 60 struct pollfd fds[] = { in test2() local 70 return ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask) == 0 ? 0 : 77; in test2() 77 int fds[2]; in main() local 83 if (pipe(fds) || pipe(fds)) in main()
|
D | pipe.c | 41 int fds[2]; in main() local 42 if (pipe(fds) || fds[0] != 0 || fds[1] != 1) in main() 48 if (pipe2(fds, O_NONBLOCK) || fds[0] != 0 || fds[1] != 1) in main()
|
/external/webrtc/webrtc/base/ |
D | linuxfdwalk_unittest.cc | 25 std::set<int> *fds = static_cast<std::set<int> *>(data); in FdCheckVisitor() local 26 EXPECT_EQ(1U, fds->erase(fd)); in FdCheckVisitor() 30 std::set<int> *fds = static_cast<std::set<int> *>(data); in FdEnumVisitor() local 31 EXPECT_TRUE(fds->insert(fd).second); in FdEnumVisitor() 35 static void CheckOpenFdList(std::set<int> fds) { in CheckOpenFdList() argument 36 EXPECT_EQ(0, fdwalk(&FdCheckVisitor, &fds)); in CheckOpenFdList() 37 EXPECT_EQ(0U, fds.size()); in CheckOpenFdList() 40 static void GetOpenFdList(std::set<int> *fds) { in GetOpenFdList() argument 41 fds->clear(); in GetOpenFdList() 42 EXPECT_EQ(0, fdwalk(&FdEnumVisitor, fds)); in GetOpenFdList() [all …]
|
/external/libchrome/base/posix/ |
D | unix_domain_socket_linux_unittest.cc | 31 int fds[2]; in TEST() local 32 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); in TEST() 33 ScopedFD scoped_fd0(fds[0]); in TEST() 34 ScopedFD scoped_fd1(fds[1]); in TEST() 40 Bind(IgnoreResult(&UnixDomainSocket::SendRecvMsg), fds[1], in TEST() 47 UnixDomainSocket::RecvMsg(fds[0], buffer, sizeof(buffer), in TEST() 66 int fds[2]; in TEST() local 67 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)); in TEST() 68 ScopedFD scoped_fd1(fds[1]); in TEST() 69 ASSERT_EQ(0, IGNORE_EINTR(close(fds[0]))); in TEST() [all …]
|
D | unix_domain_socket_linux.cc | 52 const std::vector<int>& fds) { in SendMsg() argument 60 if (fds.size()) { in SendMsg() 61 const unsigned control_len = CMSG_SPACE(sizeof(int) * fds.size()); in SendMsg() 70 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size()); in SendMsg() 71 memcpy(CMSG_DATA(cmsg), &fds[0], sizeof(int) * fds.size()); in SendMsg() 90 std::vector<ScopedFD>* fds) { in RecvMsg() argument 91 return UnixDomainSocket::RecvMsgWithPid(fd, buf, length, fds, NULL); in RecvMsg() 98 std::vector<ScopedFD>* fds, in RecvMsgWithPid() argument 100 return UnixDomainSocket::RecvMsgWithFlags(fd, buf, length, 0, fds, pid); in RecvMsgWithPid() 108 std::vector<ScopedFD>* fds, in RecvMsgWithFlags() argument [all …]
|
/external/strace/ |
D | poll.c | 35 print_pollfd(struct tcb *tcp, const struct pollfd *fds) in print_pollfd() argument 38 printfd(tcp, fds->fd); in print_pollfd() 39 if (fds->fd >= 0) { in print_pollfd() 41 printflags(pollflags, fds->events, "POLL???"); in print_pollfd() 49 struct pollfd fds; in decode_poll_entering() local 51 const unsigned long size = sizeof(fds) * nfds; in decode_poll_entering() 57 size / sizeof(fds) != nfds || end < start) { in decode_poll_entering() 64 abbrev_end = start + max_strlen * sizeof(fds); in decode_poll_entering() 71 if (start >= abbrev_end || umove(tcp, start, &fds) < 0) { in decode_poll_entering() 78 print_pollfd(tcp, &fds); in decode_poll_entering() [all …]
|
D | pathtrace.c | 252 fd_set *fds; in pathtrace_match() local 274 fds = xmalloc(fdsize); in pathtrace_match() 279 if (umoven(tcp, args[i], fdsize, fds) < 0) { in pathtrace_match() 284 j = next_set_bit(fds, j, nfds); in pathtrace_match() 288 free(fds); in pathtrace_match() 293 free(fds); in pathtrace_match() 300 struct pollfd fds; in pathtrace_match() local 307 end = start + sizeof(fds) * nfds; in pathtrace_match() 312 for (cur = start; cur < end; cur += sizeof(fds)) in pathtrace_match() 313 if ((umoven(tcp, cur, sizeof fds, &fds) == 0) in pathtrace_match() [all …]
|
D | desc.c | 85 fd_set *fds = NULL; in decode_select() local 110 fds = malloc(fdsize); in decode_select() 114 if (!fds) { in decode_select() 118 if (umoven_or_printaddr(tcp, arg, fdsize, fds)) in decode_select() 122 j = next_set_bit(fds, j, nfds); in decode_select() 131 free(fds); in decode_select() 149 fds = malloc(fdsize); in decode_select() 157 if (!arg || !fds || umoven(tcp, arg, fdsize, fds) < 0) in decode_select() 160 j = next_set_bit(fds, j, nfds); in decode_select() 184 free(fds); in decode_select()
|
/external/google-breakpad/src/client/linux/minidump_writer/ |
D | minidump_writer_unittest.cc | 68 int fds[2]; in TEST() local 69 ASSERT_NE(-1, pipe(fds)); in TEST() 73 close(fds[1]); in TEST() 75 IGNORE_RET(HANDLE_EINTR(read(fds[0], &b, sizeof(b)))); in TEST() 76 close(fds[0]); in TEST() 79 close(fds[0]); in TEST() 93 close(fds[1]); in TEST() 97 int fds[2]; in TEST() local 98 ASSERT_NE(-1, pipe(fds)); in TEST() 102 close(fds[1]); in TEST() [all …]
|
/external/google-breakpad/src/client/mac/tests/ |
D | exception_handler_test.cc | 105 int fds[2]; in InProcessCrash() local 106 ASSERT_EQ(0, pipe(fds)); in InProcessCrash() 111 close(fds[0]); in InProcessCrash() 112 ExceptionHandler eh(tempDir.path(), NULL, MDCallback, &fds[1], true, NULL); in InProcessCrash() 121 close(fds[1]); in InProcessCrash() 123 ssize_t nbytes = read(fds[0], minidump_file, sizeof(minidump_file)); in InProcessCrash() 244 int fds[2]; in TEST_F() local 245 ASSERT_EQ(0, pipe(fds)); in TEST_F() 251 close(fds[1]); in TEST_F() 264 read(fds[0], &data, 1); in TEST_F() [all …]
|
/external/dbus/dbus/ |
D | dbus-socket-set-poll.c | 37 DBusPollFD *fds; member 66 dbus_free (self->fds); in socket_set_poll_free() 88 ret->fds = dbus_new0 (DBusPollFD, size_hint); in _dbus_socket_set_poll_new() 90 if (ret->fds == NULL) in _dbus_socket_set_poll_new() 126 _dbus_assert (self->fds[i].fd != fd); in socket_set_poll_add() 131 DBusPollFD *new_fds = dbus_realloc (self->fds, in socket_set_poll_add() 141 self->fds = new_fds; in socket_set_poll_add() 154 self->fds[self->n_fds].fd = fd; in socket_set_poll_add() 155 self->fds[self->n_fds].events = watch_flags_to_poll_events (flags); in socket_set_poll_add() 172 if (self->fds[i].fd == fd) in socket_set_poll_enable() [all …]
|
/external/libvncserver/libvncclient/ |
D | listen.c | 57 fd_set fds; in listenForIncomingConnections() 95 FD_ZERO(&fds); in listenForIncomingConnections() 98 FD_SET(listenSocket, &fds); in listenForIncomingConnections() 100 FD_SET(listen6Socket, &fds); in listenForIncomingConnections() 102 r = select(max(listenSocket, listen6Socket)+1, &fds, NULL, NULL, NULL); in listenForIncomingConnections() 105 if (FD_ISSET(listenSocket, &fds)) in listenForIncomingConnections() 107 else if (FD_ISSET(listen6Socket, &fds)) in listenForIncomingConnections() 152 fd_set fds; in listenForIncomingConnectionsNoFork() local 190 FD_ZERO(&fds); in listenForIncomingConnectionsNoFork() 193 FD_SET(client->listenSock, &fds); in listenForIncomingConnectionsNoFork() [all …]
|
/external/libbrillo/brillo/ |
D | unittest_utils.cc | 20 int fds[2]; in ScopedPipe() local 21 if (pipe(fds) != 0) { in ScopedPipe() 24 reader = fds[0]; in ScopedPipe() 25 writer = fds[1]; in ScopedPipe() 38 int fds[2]; in ScopedSocketPair() local 39 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) != 0) { in ScopedSocketPair() 42 left = fds[0]; in ScopedSocketPair() 43 right = fds[1]; in ScopedSocketPair()
|
/external/e2fsprogs/lib/ |
D | fpopen.c | 42 int fds[2]; in fpopen() local 92 if (pipe(fds) < 0) in fpopen() 101 close(fds[1]); in fpopen() 102 dup2(fds[0], 0); in fpopen() 104 close(fds[0]); in fpopen() 105 dup2(fds[1], 1); in fpopen() 107 dup2(fds[1], 2); in fpopen() 113 return fdopen(do_stdin ? fds[1] : fds[0], mode); in fpopen()
|
/external/google-breakpad/src/client/linux/handler/ |
D | exception_handler_unittest.cc | 216 int fds[2] = {0}; in ChildCrash() local 222 ASSERT_NE(pipe(fds), -1); in ChildCrash() 233 close(fds[0]); // Close the reading end. in ChildCrash() 234 void* fd_param = reinterpret_cast<void*>(fds[1]); in ChildCrash() 244 close(fds[1]); // Close the writting end. in ChildCrash() 249 ASSERT_NO_FATAL_FAILURE(ReadMinidumpPathFromPipe(fds[0], &minidump_path)); in ChildCrash() 493 int fds[2]; in TEST() local 494 ASSERT_NE(pipe(fds), -1); in TEST() 503 close(fds[0]); in TEST() 505 DoneCallback, reinterpret_cast<void*>(fds[1]), in TEST() [all …]
|
/external/compiler-rt/test/tsan/ |
D | fd_dup_norace.cc | 9 int fds[2]; variable 13 read(fds[0], &buf, 1); in Thread1() 14 close(fds[0]); in Thread1() 19 close(fds[1]); in Thread2() 24 fds[0] = open("/dev/random", O_RDONLY); in main() 25 fds[1] = dup2(fds[0], 100); in main()
|
D | fd_socketpair_norace.cc | 8 int fds[2]; variable 13 write(fds[1], "a", 1); in Thread1() 14 close(fds[1]); in Thread1() 20 while (read(fds[0], &buf, 1) != 1) { in Thread2() 23 close(fds[0]); in Thread2() 28 socketpair(AF_UNIX, SOCK_STREAM, 0, fds); in main()
|
D | vfork.cc | 9 int fds[2]; variable 14 write(fds[1], "a", 1); in Thread1() 20 while (read(fds[0], &buf, 1) != 1) { in Thread2() 27 pipe(fds); in main() 38 close(fds[0]); in main() 39 close(fds[1]); in main()
|
/external/tlsdate/src/events/ |
D | tlsdate_status.c | 99 new_tlsdate_monitor_pipe (int fds[2]) in new_tlsdate_monitor_pipe() 101 if (pipe (fds) < 0) in new_tlsdate_monitor_pipe() 114 int fds[2] = { -1, -1 }; in setup_tlsdate_status() local 116 if (new_tlsdate_monitor_pipe (fds)) in setup_tlsdate_status() 120 verb_debug ("[%s] monitor fd pair (%d, %d)", __func__, fds[0], fds[1]); in setup_tlsdate_status() 122 state->tlsdate_monitor_fd = fds[1]; in setup_tlsdate_status() 124 if (fcntl (fds[0], F_SETFL, O_NONBLOCK|O_CLOEXEC) < 0) in setup_tlsdate_status() 129 state->events[E_TLSDATE_STATUS] = event_new (state->base, fds[0], in setup_tlsdate_status()
|
/external/dhcpcd-6.8.2/compat/ |
D | pselect.c | 39 pollts(struct pollfd *__restrict fds, nfds_t nfds, in pollts() argument 49 if (fds[n].events & POLLIN) { in pollts() 50 FD_SET(fds[n].fd, &read_fds); in pollts() 51 if (fds[n].fd > maxfd) in pollts() 52 maxfd = fds[n].fd; in pollts() 59 fds[n].revents = in pollts() 60 FD_ISSET(fds[n].fd, &read_fds) ? POLLIN : 0; in pollts()
|
/external/google-breakpad/src/client/linux/crash_generation/ |
D | crash_generation_client.cc | 52 int fds[2]; in RequestDump() local 53 if (sys_pipe(fds) < 0) in RequestDump() 73 *p = fds[1]; in RequestDump() 76 sys_close(fds[1]); in RequestDump() 78 sys_close(fds[0]); in RequestDump() 84 IGNORE_RET(HANDLE_EINTR(sys_read(fds[0], &b, 1))); in RequestDump() 85 sys_close(fds[0]); in RequestDump()
|
/external/toybox/toys/other/ |
D | inotifyd.c | 39 struct pollfd fds; in inotifyd_main() local 43 fds.events = POLLIN; in inotifyd_main() 47 if ((fds.fd = inotify_init()) == -1) perror_exit(0); in inotifyd_main() 68 if (inotify_add_watch(fds.fd, path, mask) < 0) perror_exit_raw(path); in inotifyd_main() 77 ret = poll(&fds, 1, -1); in inotifyd_main() 80 xioctl(fds.fd, FIONREAD, &len); in inotifyd_main() 82 len = readall(fds.fd, buf, len); in inotifyd_main() 116 inotify_rm_watch(fds.fd, event->wd); in inotifyd_main()
|
/external/valgrind/none/tests/ |
D | syscall-restart2.c | 18 int fds[2]; in main() local 20 if (pipe(fds) == -1) { in main() 43 close(fds[1]); in main() 44 ret = read(fds[0], &ch, 1); in main() 52 close(fds[0]); in main() 56 write(fds[1], "x", 1); in main()
|