Searched defs:fds (Results 1 - 25 of 29) sorted by last modified time

12

/system/tools/aidl/tests/
H A Daidl_test_client_file_descriptors.cpp94 int fds[2]; local
97 if (pipe(fds)) {
102 read_side->reset(fds[0]);
103 write_side->reset(fds[1]);
/system/nfc/halimpl/bcm2079x/adaptation/
H A Duserial_linux.c602 struct pollfd fds[2]; local
618 fds[0].fd = fd;
619 fds[0].events = POLLIN | POLLERR | POLLRDNORM;
620 fds[0].revents = 0;
622 create_signal_fds(&fds[1]);
623 fds[1].events = POLLIN | POLLERR | POLLRDNORM;
624 fds[1].revents = 0;
626 n = TEMP_FAILURE_RETRY(poll(fds, 2, _timeout));
639 if (is_signaled(&fds[1])) {
/system/media/audio_utils/tests/
H A Dgetch.c38 fd_set fds; local
39 FD_ZERO(&fds); // not in original posting to stackoverflow
40 FD_SET(0, &fds);
41 return select(1, &fds, NULL, NULL, &tv);
/system/extras/tests/pagingtest/
H A Dthrashing_test.c15 int fds[4] = {-1, -1, -1, -1}; local
34 filesize = num_pages * pagesize / (ARRAY_SIZE(fds) - 1);
36 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) {
37 fds[i] = create_tmp_file(tmpnames[i], filesize);
38 if (fds[i] < 0) {
43 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) {
44 bufs[i] = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE, fds[i], 0);
52 posix_fadvise(fds[i], 0, filesize, POSIX_FADV_RANDOM);
60 for (size_t j = 0; j < ARRAY_SIZE(fds); j++) {
73 (filesize * ARRAY_SIZE(fds) * test_run
[all...]
/system/extras/tests/storage/
H A Dopentest.c30 int *fds; local
64 fds = malloc(nfiles * sizeof(int));
65 if (fds == 0) {
66 fprintf(stderr, "Unable to malloc array of %d fds\n", nfiles);
84 fds[i] = open(name, O_WRONLY | O_CREAT, 0666);
85 if (fds[i] < 0) {
/system/extras/verity/fec/
H A Dimage.cpp94 static void file_image_load(const std::vector<int>& fds, image *ctx) argument
99 for (auto fd : fds) {
140 for (auto fd : fds) {
156 std::vector<int> fds; local
165 fds.push_back(fd);
168 file_image_load(fds, ctx);
/system/core/adb/
H A Dfdevent_test.cpp92 int fds[2]; local
93 ASSERT_EQ(0, adb_socketpair(fds));
94 read_fds.push_back(fds[0]);
95 write_fds.push_back(fds[1]);
H A Dframebuffer_service.cpp64 int fds[2]; local
67 if (pipe2(fds, O_CLOEXEC) < 0) goto pipefail;
73 dup2(fds[1], STDOUT_FILENO);
74 adb_close(fds[0]);
75 adb_close(fds[1]);
82 adb_close(fds[1]);
83 fd_screencap = fds[0];
180 adb_close(fds[0]);
H A Djdwp_service.cpp335 int fds[2]; local
337 if (adb_socketpair(fds) < 0) {
341 D("socketpair: (%d,%d)", fds[0], fds[1]);
343 proc->out_fds.emplace_back(fds[1]);
348 return fds[0];
H A Dshell_service_protocol_test.cpp43 int fds[2]; local
44 ASSERT_EQ(0, adb_socketpair(fds));
45 read_fd_ = fds[0];
46 write_fd_ = fds[1];
H A Dsysdeps_test.cpp77 int fds[2]; local
78 ASSERT_EQ(0, adb_socketpair(fds)) << strerror(errno);
79 ASSERT_TRUE(WriteFdExactly(fds[0], "foo", 4));
80 ASSERT_TRUE(WriteFdExactly(fds[1], "bar", 4));
83 ASSERT_TRUE(ReadFdExactly(fds[1], buf, 4));
85 ASSERT_TRUE(ReadFdExactly(fds[0], buf, 4));
87 ASSERT_EQ(0, adb_close(fds[0]));
88 ASSERT_EQ(0, adb_close(fds[1]));
92 std::vector<int> fds; local
96 fds
113 int fds[2]; member in class:sysdeps_poll
[all...]
H A Dsysdeps_win32.cpp527 extern int adb_poll(adb_pollfd* fds, size_t nfds, int timeout) { argument
533 FH fh = _fh_from_int(fds[i].fd, __func__);
535 D("adb_poll received bad FD %d", fds[i].fd);
536 fds[i].revents = POLLNVAL;
541 .events = static_cast<short>(fds[i].events)
544 original.push_back(&fds[i]);
568 if (fds[i].revents != 0) {
/system/core/adf/libadfhwc/
H A Dadfhwc.cpp292 pollfd fds[dev->intf_fds.size()]; local
294 fds[i].fd = dev->intf_fds[i];
295 fds[i].events = POLLIN | POLLPRI;
299 if (TEMP_FAILURE_RETRY(poll(fds, dev->intf_fds.size(), -1)) < 0) {
305 if (fds[i].revents & (POLLIN | POLLPRI))
/system/core/include/utils/
H A DFlattenable.h100 // file descriptors are written in the fds[] array but ownership is
103 inline status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
108 // unflattened file descriptors are found in the fds[] array and
112 inline status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
125 void*& buffer, size_t& size, int*& fds, size_t& count) const {
126 return static_cast<T const*>(this)->T::flatten(buffer, size, fds, count);
130 void const*& buffer, size_t& size, int const*& fds, size_t& count) {
131 return static_cast<T*>(this)->T::unflatten(buffer, size, fds, count);
124 flatten( void*& buffer, size_t& size, int*& fds, size_t& count) const argument
129 unflatten( void const*& buffer, size_t& size, int const*& fds, size_t& count) argument
/system/core/libappfuse/
H A DFuseBuffer.cc137 base::unique_fd fds[2]; local
144 fds[0].reset(raw_fds[0]);
145 fds[1].reset(raw_fds[1]);
149 if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUFFORCE, &kMaxMessageSize, sizeof(int)) != 0 ||
150 setsockopt(fds[1], SOL_SOCKET, SO_SNDBUFFORCE, &kMaxMessageSize, sizeof(int)) != 0) {
155 (*result)[0] = std::move(fds[0]);
156 (*result)[1] = std::move(fds[1]);
/system/core/libappfuse/tests/
H A DFuseBufferTest.cc196 base::unique_fd fds[2]; local
197 SetupMessageSockets(&fds);
199 std::thread thread([&fds] {
202 ASSERT_TRUE(request.Read(fds[1]));
208 ASSERT_TRUE(request.Write(fds[0]));
/system/core/libion/tests/
H A Dallocate_test.cpp98 int fds[16]; local
112 fds[i] = map_fd;
116 ASSERT_EQ(0, close(fds[i]));
/system/core/libsync/
H A Dsync.c103 struct pollfd fds; local
111 fds.fd = fd;
112 fds.events = POLLIN;
115 ret = poll(&fds, 1, timeout);
117 if (fds.revents & (POLLERR | POLLNVAL)) {
/system/core/libsync/tests/
H A Dsync_test.cpp399 struct pollfd fds; local
400 fds.fd = fenceKill.getFd();
401 fds.events = POLLIN | POLLERR;
402 ASSERT_EQ(poll(&fds, 1, 0), 0);
/system/core/libutils/include/utils/
H A DFlattenable.h100 // file descriptors are written in the fds[] array but ownership is
103 inline status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
108 // unflattened file descriptors are found in the fds[] array and
112 inline status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
125 void*& buffer, size_t& size, int*& fds, size_t& count) const {
126 return static_cast<T const*>(this)->T::flatten(buffer, size, fds, count);
130 void const*& buffer, size_t& size, int const*& fds, size_t& count) {
131 return static_cast<T*>(this)->T::unflatten(buffer, size, fds, count);
124 flatten( void*& buffer, size_t& size, int*& fds, size_t& count) const argument
129 unflatten( void const*& buffer, size_t& size, int const*& fds, size_t& count) argument
/system/core/libutils/tests/
H A DTestHelpers.h30 int fds[2]; local
31 ::pipe(fds);
33 receiveFd = fds[0];
34 sendFd = fds[1];
/system/core/logcat/
H A Dlogcat.cpp94 int fds[2]; // From popen call member in struct:android_logcat_context_internal
133 context->fds[0] = -1;
134 context->fds[1] = -1;
181 if (context->fds[1] == fileno(context->output)) {
182 context->fds[1] = -1;
190 if (context->fds[1] == context->output_fd) {
191 context->fds[1] = -1;
217 if (context->fds[1] == fileno(context->error)) {
218 context->fds[1] = -1;
227 if (context->fds[
[all...]
/system/connectivity/wificond/tests/
H A Dlooper_backed_event_loop_unittest.cpp40 int fds[2]; local
41 ::pipe(fds);
43 receive_fd = android::base::unique_fd(fds[0]);
44 send_fd = android::base::unique_fd(fds[1]);
H A Dshell_utils.cpp60 int fds[2]; local
61 if (pipe2(fds, O_NONBLOCK) != 0) {
64 unique_fd read_fd(fds[0]);
65 unique_fd write_fd(fds[1]);
/system/bt/btif/src/
H A Dbtif_sock_l2cap.cc287 int fds[2]; local
299 if (socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, fds)) {
304 sock->our_fd = fds[0];
305 sock->app_fd = fds[1];

Completed in 886 milliseconds

12