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

12345

/external/chromium_org/native_client_sdk/src/libraries/nacl_io/syscalls/
H A Dpoll.c8 int poll(struct pollfd *fds, nfds_t nfds, int timeout) { argument
9 return ki_poll(fds, nfds, timeout);
/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/chromium_org/ipc/
H A Dfile_descriptor_set_posix_unittest.cc86 static const int fds[] = {fd}; local
87 set->SetDescriptors(fds, 1);
102 int fds[1]; local
103 fds[0] = 0;
104 set->GetDescriptors(fds);
105 ASSERT_EQ(fds[0], kFDBase);
H A Dfile_descriptor_set_posix.cc129 void FileDescriptorSet::ReleaseFDsToClose(std::vector<int>* fds) { argument
133 fds->push_back(i->fd);
/external/compiler-rt/lib/tsan/lit_tests/
H A Dfd_dup_norace.cc9 int fds[2]; variable
13 read(fds[0], &buf, 1);
14 close(fds[0]);
19 close(fds[1]);
24 fds[0] = open("/dev/random", O_RDONLY);
25 fds[1] = dup2(fds[0], 100);
H A Dfd_location.cc6 int fds[2]; variable
9 write(fds[1], "a", 1);
15 close(fds[0]);
16 close(fds[1]);
21 pipe(fds);
H A Dfd_pipe_race.cc6 int fds[2]; variable
9 write(fds[1], "a", 1);
15 close(fds[0]);
16 close(fds[1]);
21 pipe(fds);
H A Dfd_pipe_norace.cc6 int fds[2]; variable
11 write(fds[1], "a", 1);
17 while (read(fds[0], &buf, 1) != 1) {
24 pipe(fds);
H A Dfd_socketpair_norace.cc8 int fds[2]; variable
13 write(fds[1], "a", 1);
14 close(fds[1]);
20 while (read(fds[0], &buf, 1) != 1) {
23 close(fds[0]);
28 socketpair(AF_UNIX, SOCK_STREAM, 0, fds);
/external/chromium_org/base/posix/
H A Dunix_domain_socket_linux_unittest.cc26 int fds[2]; local
27 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds));
28 file_util::ScopedFD scoped_fd0(&fds[0]);
29 file_util::ScopedFD scoped_fd1(&fds[1]);
36 fds[1], static_cast<uint8_t*>(NULL), 0U, static_cast<int*>(NULL),
43 UnixDomainSocket::RecvMsg(fds[0], buffer, sizeof(buffer),
63 int fds[2]; local
64 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds));
65 file_util::ScopedFD scoped_fd1(&fds[1]);
66 ASSERT_EQ(0, IGNORE_EINTR(close(fds[
[all...]
H A Dunix_domain_socket_linux.cc23 const std::vector<int>& fds) {
30 if (fds.size()) {
31 const unsigned control_len = CMSG_SPACE(sizeof(int) * fds.size());
40 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fds.size());
41 memcpy(CMSG_DATA(cmsg), &fds[0], sizeof(int) * fds.size()); local
60 std::vector<int>* fds) {
61 return UnixDomainSocket::RecvMsgWithFlags(fd, buf, length, 0, fds);
69 std::vector<int>* fds) {
70 fds
20 SendMsg(int fd, const void* buf, size_t length, const std::vector<int>& fds) argument
57 RecvMsg(int fd, void* buf, size_t length, std::vector<int>* fds) argument
65 RecvMsgWithFlags(int fd, void* buf, size_t length, int flags, std::vector<int>* fds) argument
133 int fds[2]; local
[all...]
/external/chromium_org/content/renderer/pepper/
H A Dpepper_broker_unittest.cc43 int fds[2] = {-1, -1}; local
44 ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, fds));
46 ASSERT_EQ(0, fcntl(fds[1], F_SETFL, O_NONBLOCK));
47 base::FileDescriptor file_descriptor(fds[1], true); // Auto close.
56 EXPECT_EQ(0, ::close(fds[0]));
/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/chromium_org/third_party/libjingle/source/talk/base/
H A Dlinuxfdwalk_unittest.cc42 std::set<int> *fds = static_cast<std::set<int> *>(data); local
43 EXPECT_EQ(1U, fds->erase(fd));
47 std::set<int> *fds = static_cast<std::set<int> *>(data); local
48 EXPECT_TRUE(fds->insert(fd).second);
51 // Checks that the set of open fds is exactly the given list.
52 static void CheckOpenFdList(std::set<int> fds) { argument
53 EXPECT_EQ(0, fdwalk(&FdCheckVisitor, &fds));
54 EXPECT_EQ(0U, fds.size());
57 static void GetOpenFdList(std::set<int> *fds) { argument
58 fds
63 std::set<int> fds; local
[all...]
/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/chromium_org/chrome/browser/
H A Dprocess_info_snapshot_mac_unittest.cc102 int fds[2]; local
103 PCHECK(pipe(fds) == 0);
105 fds_to_remap.push_back(std::make_pair(fds[1], 1));
119 PCHECK(IGNORE_EINTR(close(fds[1])) == 0);
124 PCHECK(HANDLE_EINTR(read(fds[0], buf, 1)) == 1);
139 PCHECK(IGNORE_EINTR(close(fds[0])) == 0);
/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];
/external/chromium_org/mojo/system/
H A Dplatform_channel_posix.cc57 int fds[2]; local
58 PCHECK(socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0);
59 PCHECK(fcntl(fds[0], F_SETFL, O_NONBLOCK) == 0);
60 PCHECK(fcntl(fds[1], F_SETFL, O_NONBLOCK) == 0);
62 mutable_handle()->fd = fds[0];
64 client_handle_.fd = fds[1];
/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;
/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...]

Completed in 664 milliseconds

12345