/system/extras/tests/pagingtest/ |
D | thrashing_test.c | 14 int fds[4] = {-1, -1, -1, -1}; in thrashing_test() local 34 filesize = num_pages * pagesize / (ARRAY_SIZE(fds) - 1); in thrashing_test() 36 for (i = 0; i < ARRAY_SIZE(fds); i++) { in thrashing_test() 37 fds[i] = create_tmp_file(tmpnames[i], filesize); in thrashing_test() 38 if (fds[i] < 0) { in thrashing_test() 43 for (i = 0; i < ARRAY_SIZE(fds); i++) { in thrashing_test() 44 bufs[i] = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE, fds[i], 0); in thrashing_test() 52 for (j = 0; j < ARRAY_SIZE(fds); j++) { in thrashing_test() 66 printf("thrashing: %llu MB/s\n", (filesize * ARRAY_SIZE(fds) * test_runs * USEC_PER_SEC) / in thrashing_test() 76 for (i = 0; i < ARRAY_SIZE(fds) && fds[i] >= 0; i++) { in thrashing_test() [all …]
|
/system/extras/tests/storage/ |
D | opentest.c | 30 int *fds; in main() local 64 fds = malloc(nfiles * sizeof(int)); in main() 65 if (fds == 0) { in main() 84 fds[i] = open(name, O_WRONLY | O_CREAT, 0666); in main() 85 if (fds[i] < 0) { in main()
|
/system/core/adb/ |
D | framebuffer_service.cpp | 64 int fds[2]; in framebuffer_service() local 67 if (pipe2(fds, O_CLOEXEC) < 0) goto pipefail; in framebuffer_service() 73 dup2(fds[1], STDOUT_FILENO); in framebuffer_service() 74 adb_close(fds[0]); in framebuffer_service() 75 adb_close(fds[1]); in framebuffer_service() 82 adb_close(fds[1]); in framebuffer_service() 83 fd_screencap = fds[0]; in framebuffer_service() 180 adb_close(fds[0]); in framebuffer_service()
|
D | jdwp_service.cpp | 425 int fds[2]; in create_jdwp_connection_fd() local 433 if (adb_socketpair(fds) < 0) { in create_jdwp_connection_fd() 438 D("socketpair: (%d,%d)", fds[0], fds[1]); in create_jdwp_connection_fd() 440 proc->out_fds[ proc->out_count ] = fds[1]; in create_jdwp_connection_fd() 444 return fds[0]; in create_jdwp_connection_fd()
|
D | commandline.cpp | 362 int *fds = (int*) x; in stdin_read_thread() local 363 fd = fds[0]; in stdin_read_thread() 364 fdi = fds[1]; in stdin_read_thread() 365 free(fds); in stdin_read_thread() 418 int* fds = reinterpret_cast<int*>(malloc(sizeof(int) * 2)); in interactive_shell() local 419 if (fds == nullptr) { in interactive_shell() 424 fds[0] = fd; in interactive_shell() 425 fds[1] = fdi; in interactive_shell() 428 adb_thread_create(&thr, stdin_read_thread, fds); in interactive_shell()
|
D | fdevent.cpp | 300 static int fdevent_fd_check(fd_set *fds) in fdevent_fd_check() argument 309 FD_SET(i, fds); in fdevent_fd_check()
|
/system/core/libutils/tests/ |
D | TestHelpers.h | 30 int fds[2]; in Pipe() local 31 ::pipe(fds); in Pipe() 33 receiveFd = fds[0]; in Pipe() 34 sendFd = fds[1]; in Pipe()
|
/system/core/include/utils/ |
D | Flattenable.h | 96 inline status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const; 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 { in flatten() argument 119 return static_cast<T const*>(this)->T::flatten(buffer, size, fds, count); in flatten() 123 void const*& buffer, size_t& size, int const*& fds, size_t& count) { in unflatten() argument 124 return static_cast<T*>(this)->T::unflatten(buffer, size, fds, count); in unflatten()
|
/system/core/adf/libadfhwc/ |
D | adfhwc.cpp | 211 pollfd *fds = new pollfd[dev->intf_fds.size()]; in adf_event_thread() local 213 fds[i].fd = dev->intf_fds[i]; in adf_event_thread() 214 fds[i].events = POLLIN | POLLPRI; in adf_event_thread() 218 int err = poll(fds, dev->intf_fds.size(), -1); in adf_event_thread() 222 if (fds[i].revents & (POLLIN | POLLPRI)) in adf_event_thread() 232 delete [] fds; in adf_event_thread()
|
/system/core/libion/tests/ |
D | allocate_test.cpp | 97 int fds[16]; in TEST_F() local 111 fds[i] = map_fd; in TEST_F() 115 ASSERT_EQ(0, close(fds[i])); in TEST_F()
|
/system/core/libsync/tests/ |
D | sync_test.cpp | 391 struct pollfd fds; in TEST() local 392 fds.fd = fenceKill.getFd(); in TEST() 393 fds.events = POLLIN | POLLERR; in TEST() 394 ASSERT_EQ(poll(&fds, 1, -1), 1); in TEST() 395 ASSERT_TRUE(fds.revents & POLLERR); in TEST()
|
/system/bt/btif/src/ |
D | btif_sock_l2cap.c | 305 int fds[2]; in btsock_l2cap_alloc_l() local 322 if (socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, fds)) { in btsock_l2cap_alloc_l() 327 sock->our_fd = fds[0]; in btsock_l2cap_alloc_l() 328 sock->app_fd = fds[1]; in btsock_l2cap_alloc_l()
|
D | btif_sock_rfc.c | 190 int fds[2] = { INVALID_FD, INVALID_FD }; in alloc_rfc_slot() local 191 if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fds) == -1) { in alloc_rfc_slot() 200 slot->fd = fds[0]; in alloc_rfc_slot() 201 slot->app_fd = fds[1]; in alloc_rfc_slot()
|