Searched refs:fds (Results 1 - 23 of 23) sorted by relevance

/system/extras/tests/pagingtest/
H A Dthrashing_test.c14 int fds[4] = {-1, -1, -1, -1}; local
33 filesize = num_pages * pagesize / (ARRAY_SIZE(fds) - 1);
35 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) {
36 fds[i] = create_tmp_file(tmpnames[i], filesize);
37 if (fds[i] < 0) {
42 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) {
43 bufs[i] = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE, fds[i], 0);
51 for (size_t j = 0; j < ARRAY_SIZE(fds); j++) {
65 printf("thrashing: %llu MB/s\n", (filesize * ARRAY_SIZE(fds) * test_runs * USEC_PER_SEC) /
75 for (size_t i = 0; i < ARRAY_SIZE(fds)
[all...]
/system/core/adb/
H A Dsysdeps_test.cpp73 int fds[2]; local
74 ASSERT_EQ(0, adb_socketpair(fds)) << strerror(errno);
75 ASSERT_TRUE(WriteFdExactly(fds[0], "foo", 4));
76 ASSERT_TRUE(WriteFdExactly(fds[1], "bar", 4));
79 ASSERT_TRUE(ReadFdExactly(fds[1], buf, 4));
81 ASSERT_TRUE(ReadFdExactly(fds[0], buf, 4));
83 ASSERT_EQ(0, adb_close(fds[0]));
84 ASSERT_EQ(0, adb_close(fds[1]));
88 std::vector<int> fds; local
92 fds
109 int fds[2]; member in class:sysdeps_poll
[all...]
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 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 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 Djdwp_service.cpp416 int fds[2]; local
424 if (adb_socketpair(fds) < 0) {
429 D("socketpair: (%d,%d)", fds[0], fds[1]);
431 proc->out_fds[ proc->out_count ] = fds[1];
435 return fds[0];
H A Dsysdeps.h303 extern int adb_poll(adb_pollfd* fds, size_t nfds, int timeout);
784 static __inline__ int adb_poll(adb_pollfd* fds, size_t nfds, int timeout) {
785 return TEMP_FAILURE_RETRY(poll(fds, nfds, timeout));
H A Dsysdeps_win32.cpp664 extern int adb_poll(adb_pollfd* fds, size_t nfds, int timeout) { argument
670 FH fh = _fh_from_int(fds[i].fd, __func__);
672 D("adb_poll received bad FD %d", fds[i].fd);
673 fds[i].revents = POLLNVAL;
678 .events = static_cast<short>(fds[i].events)
681 original.push_back(&fds[i]);
705 if (fds[i].revents != 0) {
/system/core/libutils/tests/
H A DTestHelpers.h30 int fds[2]; local
31 ::pipe(fds);
33 receiveFd = fds[0];
34 sendFd = fds[1];
/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/connectivity/shill/dbus/
H A Dchromeos_permission_broker_proxy.cc51 int fds[2]; local
52 if (pipe(fds) != 0) {
56 lifeline_read_fd_ = fds[0];
57 lifeline_write_fd_ = fds[1];
/system/webservd/webservd/
H A Dpermission_broker_firewall.cc27 int fds[2]; local
28 PCHECK(pipe(fds) == 0) << "Failed to create firewall lifeline pipe";
29 lifeline_read_fd_ = fds[0];
30 lifeline_write_fd_ = fds[1];
/system/connectivity/apmanager/dbus/
H A Dpermission_broker_dbus_proxy.cc51 int fds[2]; local
52 CHECK(pipe(fds) == 0) << "Failed to create lifeline pipe";
53 lifeline_read_fd_ = fds[0];
54 lifeline_write_fd_ = fds[1];
/system/tools/aidl/tests/
H A Daidl_test_client_file_descriptors.cpp91 int fds[2]; local
94 if (pipe(fds)) {
99 read_side->reset(fds[0]);
100 write_side->reset(fds[1]);
/system/core/include/utils/
H A DFlattenable.h93 // file descriptors are written in the fds[] array but ownership is
96 inline status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
101 // unflattened file descriptors are found in the fds[] array and
105 inline status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
118 void*& buffer, size_t& size, int*& fds, size_t& count) const {
119 return static_cast<T const*>(this)->T::flatten(buffer, size, fds, count);
123 void const*& buffer, size_t& size, int const*& fds, size_t& count) {
124 return static_cast<T*>(this)->T::unflatten(buffer, size, fds, count);
117 flatten( void*& buffer, size_t& size, int*& fds, size_t& count) const argument
122 unflatten( void const*& buffer, size_t& size, int const*& fds, size_t& count) argument
/system/bt/vendor_libs/linux/
H A Dbt_vendor_linux.c151 struct pollfd fds[1]; local
175 fds[0].fd = fd;
176 fds[0].events = POLLIN;
193 OSI_NO_INTR(n = poll(fds, 1, MGMT_EV_POLL_TIMEOUT));
204 if (fds[0].revents & POLLIN) {
/system/core/libion/tests/
H A Dallocate_test.cpp97 int fds[16]; local
111 fds[i] = map_fd;
115 ASSERT_EQ(0, close(fds[i]));
/system/core/adf/libadfhwc/
H A Dadfhwc.cpp211 pollfd *fds = new pollfd[dev->intf_fds.size()]; local
213 fds[i].fd = dev->intf_fds[i];
214 fds[i].events = POLLIN | POLLPRI;
218 int err = poll(fds, dev->intf_fds.size(), -1);
222 if (fds[i].revents & (POLLIN | POLLPRI))
232 delete [] fds;
/system/extras/verity/fec/
H A Dimage.cpp132 static void mmap_image_load(const std::vector<int>& fds, image *ctx, argument
135 if (fds.size() != 1) {
139 int fd = fds.front();
204 static void file_image_load(const std::vector<int>& fds, image *ctx) argument
211 for (auto fd : fds) {
257 for (auto fd : fds) {
273 for (auto fd : fds) {
291 std::vector<int> fds; local
300 fds.push_back(fd);
304 mmap_image_load(fds, ct
[all...]
/system/core/libsync/tests/
H A Dsync_test.cpp391 struct pollfd fds; local
392 fds.fd = fenceKill.getFd();
393 fds.events = POLLIN | POLLERR;
394 ASSERT_EQ(poll(&fds, 1, -1), 1);
395 ASSERT_TRUE(fds.revents & POLLERR);
/system/bt/btif/src/
H A Dbtif_sock_l2cap.c301 int fds[2]; local
313 if (socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, fds)) {
318 sock->our_fd = fds[0];
319 sock->app_fd = fds[1];
H A Dbtif_sock_rfc.c197 int fds[2] = { INVALID_FD, INVALID_FD }; local
198 if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fds) == -1) {
207 slot->fd = fds[0];
208 slot->app_fd = fds[1];
/system/extras/simpleperf/
H A Dcmd_record.cpp518 const std::vector<std::unique_ptr<EventFd>>* fds = local
520 CHECK(fds != nullptr);
521 for (auto& fd : *fds) {

Completed in 563 milliseconds