Home
last modified time | relevance | path

Searched refs:ufd (Results 1 – 13 of 13) sorted by relevance

/system/libbase/tidy/
Dunique_fd_test.cpp27 android::base::unique_fd ufd(open("/dev/null", O_RDONLY | O_CLOEXEC)); in TEST() local
28 consume_unique_fd(std::move(ufd)); in TEST()
29 ufd.reset(open("/dev/null", O_RDONLY | O_CLOEXEC)); in TEST()
30 ufd.get(); in TEST()
31 consume_unique_fd(std::move(ufd)); in TEST()
/system/core/init/
Duevent_listener.cpp187 pollfd ufd; in Poll() local
188 ufd.events = POLLIN; in Poll()
189 ufd.fd = device_fd_; in Poll()
194 ufd.revents = 0; in Poll()
206 int nr = poll(&ufd, 1, timeout_ms); in Poll()
212 if (ufd.revents & POLLIN) { in Poll()
Dsubcontext.cpp119 pollfd ufd[1]; in MainLoop() local
120 ufd[0].events = POLLIN; in MainLoop()
121 ufd[0].fd = init_fd_; in MainLoop()
124 ufd[0].revents = 0; in MainLoop()
125 int nr = TEMP_FAILURE_RETRY(poll(ufd, arraysize(ufd), -1)); in MainLoop()
/system/libbase/include/android-base/
Dunique_fd.h240 inline FILE* Fdopen(unique_fd&& ufd, const char* mode) { in Fdopen() argument
241 int fd = ufd.release(); in Fdopen()
251 inline DIR* Fdopendir(unique_fd&& ufd) { in Fdopendir() argument
252 int fd = ufd.release(); in Fdopendir()
266 /* implicit */ borrowed_fd(const unique_fd_impl<T>& ufd) : fd_(ufd.get()) {} // NOLINT in borrowed_fd()
/system/core/adb/client/pairing/tests/
Dpairing_server.cpp318 auto [ufd, connection] = std::move(*p); in connectionEventsWorker()
319 int fd = ufd.release(); in connectionEventsWorker()
342 ufd.reset(fd); in connectionEventsWorker()
377 unique_fd ufd(TEMP_FAILURE_RETRY(accept4(fd, nullptr, nullptr, SOCK_CLOEXEC))); in handleNewClientConnection() local
378 if (ufd == -1) { in handleNewClientConnection()
389 NewConnectionEvent event = std::make_tuple(std::move(ufd), std::move(connection)); in handleNewClientConnection()
/system/core/adb/fdevent/
Dfdevent.cpp209 unique_fd ufd(fd); in fdevent_create() local
210 return fdevent_get_ambient()->Create(std::move(ufd), func, arg); in fdevent_create()
214 unique_fd ufd(fd); in fdevent_create() local
215 return fdevent_get_ambient()->Create(std::move(ufd), func, arg); in fdevent_create()
/system/core/adb/pairing_connection/
Dpairing_server.cpp362 auto [ufd, connection] = std::move(*p); in ConnectionEventsWorker()
363 int fd = ufd.release(); in ConnectionEventsWorker()
368 ufd.reset(fd); in ConnectionEventsWorker()
408 unique_fd ufd(TEMP_FAILURE_RETRY(accept4(fd, nullptr, nullptr, SOCK_CLOEXEC))); in HandleNewClientConnection() local
409 if (ufd == -1) { in HandleNewClientConnection()
419 NewConnectionEvent event = std::make_tuple(std::move(ufd), std::move(connection)); in HandleNewClientConnection()
/system/netd/server/
DOffloadUtils.cpp42 base::unique_fd ufd(socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in hardwareAddressType() local
44 if (ufd < 0) { in hardwareAddressType()
59 if (ioctl(ufd, SIOCGIFHWADDR, &ifr, sizeof(ifr))) return -errno; in hardwareAddressType()
/system/bt/btif/src/
Dbtif_pan.cc669 struct pollfd ufd; in btu_exec_tap_fd_read() local
737 ufd.fd = fd; in btu_exec_tap_fd_read()
738 ufd.events = POLLIN; in btu_exec_tap_fd_read()
739 ufd.revents = 0; in btu_exec_tap_fd_read()
742 OSI_NO_INTR(ret = poll(&ufd, 1, 0)); in btu_exec_tap_fd_read()
743 if (ret <= 0 || IS_EXCEPTION(ufd.revents)) break; in btu_exec_tap_fd_read()
/system/core/adb/daemon/
Djdwp_service.cpp499 unique_fd ufd(fd); in init_jdwp() local
500 auto proc = std::make_unique<JdwpProcess>(std::move(ufd), process); in init_jdwp()
/system/netd/client/
DNetdClient.cpp574 unique_fd ufd(fd); in resNetworkResult() local
619 unique_fd ufd(fd); in getNetworkForDns() local
/system/core/adb/
Dsockets.cpp388 asocket* create_local_socket(unique_fd ufd) { in create_local_socket() argument
389 int fd = ufd.release(); in create_local_socket()
/system/vold/
DUtils.cpp329 android::base::unique_fd ufd) { in ReadLinesFromFdAndLog() argument
330 std::unique_ptr<FILE, int (*)(FILE*)> fp(android::base::Fdopen(std::move(ufd), "r"), fclose); in ReadLinesFromFdAndLog()