Home
last modified time | relevance | path

Searched refs:unique_fd (Results 1 – 25 of 703) sorted by relevance

12345678910>>...29

/aosp12/system/hardware/interfaces/suspend/1.0/default/
H A DSystemSuspend.h41 using ::android::base::unique_fd;
97 SystemSuspend(unique_fd wakeupCountFd, unique_fd stateFd, unique_fd suspendStatsFd,
99 unique_fd wakeupReasonsFd, unique_fd suspendTimeFd,
117 unique_fd reopenFileUsingFd(const int fd, int permission);
125 unique_fd mWakeupCountFd;
126 unique_fd mStateFd;
128 unique_fd mSuspendStatsFd;
129 unique_fd mSuspendTimeFd;
153 unique_fd mWakeLockFd;
154 unique_fd mWakeUnlockFd;
[all …]
/aosp12/system/tools/aidl/tests/
H A Daidl_test_client_file_descriptors.cpp30 using android::base::unique_fd;
37 void DoPipe(unique_fd* read_side, unique_fd* write_side) { in DoPipe()
68 unique_fd read_fd; in TEST_F()
69 unique_fd write_fd; in TEST_F()
72 unique_fd return_fd; in TEST_F()
87 std::vector<unique_fd> array; in TEST_F()
91 std::vector<unique_fd> repeated; in TEST_F()
100 std::vector<unique_fd> reversed; in TEST_F()
111 unique_fd read_fd; in TEST_F()
112 unique_fd write_fd; in TEST_F()
[all …]
/aosp12/packages/modules/adb/daemon/
H A Dabb_service.cpp31 unique_fd sendCommand(std::string_view command);
34 static unique_fd startAbbProcess(unique_fd* error_fd);
40 unique_fd socket_fd_;
43 unique_fd AbbProcess::sendCommand(std::string_view command) { in sendCommand()
47 unique_fd error_fd; in sendCommand()
62 unique_fd fd; in sendCommand()
78 unique_fd AbbProcess::startAbbProcess(unique_fd* error_fd) { in startAbbProcess()
88 unique_fd execute_abb_command(std::string_view command) { in execute_abb_command()
H A Dshell_service.cpp133 bool CreateSocketpair(unique_fd* fd1, unique_fd* fd2) { in CreateSocketpair()
197 unique_fd* PassInput();
198 unique_fd* PassOutput(unique_fd* sfd, ShellProtocol::Id id);
206 unique_fd local_socket_sfd_;
569 unique_fd* dead_sfd = PollLoop(&pfds); in PassDataStreams()
600 unique_fd* dead_sfd = nullptr; in PollLoop()
671 unique_fd* Subprocess::PassInput() { in PassInput()
739 unique_fd* Subprocess::PassOutput(unique_fd* sfd, ShellProtocol::Id id) { in PassOutput()
799 unique_fd read, write; in ReportError()
802 return unique_fd{}; in ReportError()
[all …]
H A Dservices.cpp61 void reconnect_service(unique_fd fd, atransport* t) { in reconnect_service()
73 return unique_fd{}; in reverse_service()
80 return unique_fd{s[0]}; in reverse_service()
89 return unique_fd{}; in ShellService()
122 static void spin_service(unique_fd fd) { in spin_service()
129 unique_fd pipe_read, pipe_write; in spin_service()
147 auto reboot_service = [name](unique_fd fd) { in reboot_device()
303 return unique_fd{}; in daemon_service_to_fd()
313 return unique_fd{unix_open(name, O_RDWR | O_CLOEXEC)}; in daemon_service_to_fd()
317 return unique_fd{}; in daemon_service_to_fd()
[all …]
H A Dshell_service.h39 unique_fd StartSubprocess(std::string name, const char* terminal_type, SubprocessType type,
43 unique_fd StartSubprocess(std::string name, const char* terminal_type, SubprocessType type,
45 SubprocessProtocol error_protocol, unique_fd* error_fd);
52 unique_fd StartCommandInProcess(std::string name, Command command, SubprocessProtocol protocol);
55 unique_fd ReportError(SubprocessProtocol protocol, const std::string& message);
H A Dtransport_local.cpp52 void server_socket_thread(std::function<unique_fd(std::string_view, std::string*)> listen_func, in server_socket_thread()
56 unique_fd serverfd; in server_socket_thread()
75 unique_fd fd(adb_socket_accept(serverfd, nullptr, nullptr)); in server_socket_thread()
91 unique_fd adb_listen(std::string_view addr, std::string* error) { in adb_listen()
92 return unique_fd{socket_spec_listen(addr, error, nullptr)}; in adb_listen()
100 int init_socket_transport(atransport* t, unique_fd fd, int adb_port, int local) { in init_socket_transport()
H A Drestart_service.h22 void restart_root_service(unique_fd fd);
23 void restart_unroot_service(unique_fd fd);
24 void restart_tcp_service(unique_fd fd, int port);
25 void restart_usb_service(unique_fd fd);
/aosp12/frameworks/native/libs/binder/
H A DRpcState.h55 sp<IBinder> getRootObject(const base::unique_fd& fd, const sp<RpcSession>& session);
56 status_t getMaxThreads(const base::unique_fd& fd, const sp<RpcSession>& session,
58 status_t getSessionId(const base::unique_fd& fd, const sp<RpcSession>& session,
61 [[nodiscard]] status_t transact(const base::unique_fd& fd, const RpcAddress& address,
64 [[nodiscard]] status_t sendDecStrong(const base::unique_fd& fd, const RpcAddress& address);
65 [[nodiscard]] status_t getAndExecuteCommand(const base::unique_fd& fd,
118 [[nodiscard]] bool rpcSend(const base::unique_fd& fd, const char* what, const void* data,
122 [[nodiscard]] status_t waitForReply(const base::unique_fd& fd, const sp<RpcSession>& session,
124 [[nodiscard]] status_t processServerCommand(const base::unique_fd& fd,
129 [[nodiscard]] status_t processTransactInternal(const base::unique_fd& fd,
[all …]
/aosp12/system/libbase/
H A Dcmsg_test.cpp28 using android::base::unique_fd;
57 unique_fd send;
58 unique_fd recv;
63 unique_fd fd1;
64 unique_fd fd2;
74 unique_fd received; in TEST_P()
86 unique_fd received1, received2; in TEST_P()
108 unique_fd received; in TEST_P()
121 unique_fd received; in TEST_P()
145 unique_fd received2; in TEST_P()
[all …]
/aosp12/packages/modules/adb/
H A Dservices.cpp47 unique_fd fd) { in service_bootstrap_func()
54 unique_fd create_service_thread(const char* service_name, std::function<void(unique_fd)> func) { in create_service_thread()
58 return unique_fd(); in create_service_thread()
74 return unique_fd(s[0]); in create_service_thread()
77 unique_fd service_to_fd(std::string_view name, atransport* transport) { in service_to_fd()
78 unique_fd ret; in service_to_fd()
137 static void connect_service(unique_fd fd, std::string host) { in connect_service()
149 static void pair_service(unique_fd fd, std::string host, std::string password) { in pair_service()
250 unique_fd fd = in host_service_to_socket()
256 unique_fd fd = create_service_thread( in host_service_to_socket()
[all …]
H A Dtransport_fd.cpp35 static void CreateWakeFds(unique_fd* read, unique_fd* write) { in CreateWakeFds()
42 *read = unique_fd(wake_fds[0]); in CreateWakeFds()
43 *write = unique_fd(wake_fds[1]); in CreateWakeFds()
47 NonblockingFdConnection(unique_fd fd) : started_(false), fd_(std::move(fd)) { in NonblockingFdConnection()
228 unique_fd fd_;
229 unique_fd wake_fd_read_;
230 unique_fd wake_fd_write_;
239 std::unique_ptr<Connection> Connection::FromFd(unique_fd fd) { in FromFd()
/aosp12/system/core/debuggerd/
H A Ddebuggerd_test.cpp240 unique_fd read_pipe; in StartProcess()
328 unique_fd output_fd; in TEST_F()
355 unique_fd output_fd; in TEST_F()
387 unique_fd output_fd; in TEST_F()
463 unique_fd output_fd; in TEST_P()
512 unique_fd output_fd; in TEST_P()
552 unique_fd output_fd; in TEST_P()
585 unique_fd output_fd; in TEST_P()
627 unique_fd output_fd; in TEST_P()
664 unique_fd output_fd; in TEST_F()
[all …]
/aosp12/system/core/debuggerd/tombstoned/
H A Dtombstoned_client.cpp33 using android::base::unique_fd;
35 bool tombstoned_connect(pid_t pid, unique_fd* tombstoned_socket, unique_fd* text_output_fd, in tombstoned_connect()
40 bool tombstoned_connect(pid_t pid, unique_fd* tombstoned_socket, unique_fd* text_output_fd, in tombstoned_connect()
41 unique_fd* proto_output_fd, DebuggerdDumpType dump_type) { in tombstoned_connect()
42 unique_fd sockfd( in tombstoned_connect()
62 unique_fd tmp_output_fd, tmp_proto_fd; in tombstoned_connect()
/aosp12/frameworks/native/cmds/installd/
H A Ddexopt.cpp70 using android::base::unique_fd;
88 static unique_fd invalid_unique_fd() { in invalid_unique_fd()
89 return unique_fd(-1); in invalid_unique_fd()
322 unique_fd fd; in open_profile()
376 unique_fd ufd = open_profile( in open_reference_profile_as_unique_file()
395 /*out*/ std::vector<unique_fd>* profiles_fd, /*out*/ unique_fd* reference_profile_fd) { in open_profile_files()
501 const std::vector<unique_fd>& apk_fds = std::vector<unique_fd>(), in SetupMerge()
573 const std::vector<unique_fd>& apk_fds = std::vector<unique_fd>(); in analyze_profiles()
1570 unique_fd zip_fd; in process_secondary_dex_dexopt()
1593 unique_fd oat_file_fd; in process_secondary_dex_dexopt()
[all …]
/aosp12/system/core/fs_mgr/libdm/
H A Dloop_control_test.cpp33 using unique_fd = android::base::unique_fd; typedef
35 static unique_fd TempFile() { in TempFile()
38 unique_fd fd(CreateTempFile("temp", 0)); in TempFile()
53 unique_fd fd = TempFile(); in TEST()
60 unique_fd loop_fd(open(loop.device().c_str(), O_RDWR)); in TEST()
/aosp12/bionic/tests/
H A Dpidfd_test.cpp32 using android::base::unique_fd;
45 unique_fd pidfd(pidfd_open(child, 0)); in TEST()
64 unique_fd r, w; in TEST()
66 unique_fd self(pidfd_open(getpid(), 0)); in TEST()
72 unique_fd dup(pidfd_getfd(self.get(), r.get(), 0)); in TEST()
88 unique_fd self(pidfd_open(getpid(), 0)); in TEST_F()
101 unique_fd child(pidfd_open(getpid(), 0)); in TEST_F()
/aosp12/system/core/debuggerd/tombstoned/include/tombstoned/
H A Dtombstoned.h25 bool tombstoned_connect(pid_t pid, android::base::unique_fd* tombstoned_socket,
26 android::base::unique_fd* text_output_fd,
27 android::base::unique_fd* proto_output_fd, DebuggerdDumpType dump_type);
29 bool tombstoned_connect(pid_t pid, android::base::unique_fd* tombstoned_socket,
30 android::base::unique_fd* text_output_fd, DebuggerdDumpType dump_type);
/aosp12/system/core/libsysutils/src/
H A DSocketListener_test.cpp35 using android::base::unique_fd;
46 unique_fd serverSocket(const std::string& path) { in serverSocket()
49 unique_fd fd(socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in serverSocket()
62 unique_fd clientSocket(const std::string& path) { in clientSocket()
63 unique_fd fd(socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in clientSocket()
140 unique_fd client_fd = clientSocket(mSocketPath); in testCommand()
149 unique_fd mSserverFd;
176 unique_fd client1 = clientSocket(mSocketPath); in TEST_F()
177 unique_fd client2 = clientSocket(mSocketPath); in TEST_F()
/aosp12/frameworks/native/services/vr/hardware_composer/aidl/android/dvr/
H A Dparcelable_unique_fd.h16 explicit ParcelableUniqueFd(const base::unique_fd& fence);
19 void set_fence(const base::unique_fd& fence) { in set_fence()
22 base::unique_fd fence() const { return base::unique_fd(dup(fence_.get())); } in fence()
28 base::unique_fd fence_;
/aosp12/system/netd/client/
H A DNetdClientTest.cpp64 android::base::unique_fd ipv4(socketFuncPtr(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)), in expectAllowNetworkingForProcess()
70 android::base::unique_fd dnsproxydSocket(openDnsProxyFuncPtr()); in expectAllowNetworkingForProcess()
76 android::base::unique_fd unixSocket(socketFuncPtr(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess()
78 android::base::unique_fd ipv4(socketFuncPtr(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess()
81 android::base::unique_fd ipv6(socketFuncPtr(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess()
86 android::base::unique_fd dnsproxydSocket(openDnsProxyFuncPtr()); in expectNotAllowNetworkingForProcess()
100 android::base::unique_fd clientFd, serverFd; in TEST()
/aosp12/frameworks/base/cmds/incidentd/src/
H A Dincidentd_util.h35 using android::base::unique_fd;
72 unique_fd& readFd();
73 unique_fd& writeFd();
76 unique_fd mRead;
77 unique_fd mWrite;
/aosp12/art/dt_fd_forward/
H A Ddt_fd_forward.h125 android::base::unique_fd read_fd_; // GUARDED_BY(state_mutex_);
127 android::base::unique_fd write_fd_; // GUARDED_BY(state_mutex_);
131 android::base::unique_fd write_lock_fd_; // GUARDED_BY(state_mutex_);
134 android::base::unique_fd wakeup_fd_;
137 android::base::unique_fd listen_fd_;
140 android::base::unique_fd close_notify_fd_;
/aosp12/system/core/fs_mgr/liblp/
H A Dio_test.cpp40 using unique_fd = android::base::unique_fd; typedef
77 static unique_fd CreateFakeDisk() { in CreateFakeDisk()
103 static unique_fd CreateFlashedDisk() { in CreateFlashedDisk()
108 unique_fd fd = CreateFakeDisk(); in CreateFlashedDisk()
127 unique_fd fd = CreateFakeDisk(); in TEST_F()
150 unique_fd fd = CreateFakeDisk(); in TEST_F()
164 unique_fd fd = CreateFakeDisk(); in TEST_F()
210 unique_fd fd = CreateFlashedDisk(); in TEST_F()
390 unique_fd fd = CreateFakeDisk(); in TEST_F()
593 unique_fd fd = CreateFakeDisk(); in TEST_F()
[all …]
/aosp12/system/core/libcutils/
H A Dashmem_test.cpp30 using android::base::unique_fd;
32 void TestCreateRegion(size_t size, unique_fd &fd, int prot) { in TestCreateRegion()
33 fd = unique_fd(ashmem_create_region(nullptr, size)); in TestCreateRegion()
52 void TestProtDenied(const unique_fd &fd, size_t size, int prot) { in TestProtDenied()
58 void TestProtIs(const unique_fd& fd, int prot) { in TestProtIs()
75 unique_fd fd; in TEST()
97 unique_fd fd; in TEST()
133 unique_fd fd; in TEST()
191 unique_fd fd; in TEST()
219 unique_fd fd; in TEST()
[all …]

12345678910>>...29