/device/google/cuttlefish_common/host/frontend/vnc_server/ |
D | virtual_inputs.cpp | 28 using cvd::vnc::VirtualInputs; 39 (*key_mapping)[cvd::xk::AltLeft] = KEY_LEFTALT; in AddKeyMappings() 40 (*key_mapping)[cvd::xk::ControlLeft] = KEY_LEFTCTRL; in AddKeyMappings() 41 (*key_mapping)[cvd::xk::ShiftLeft] = KEY_LEFTSHIFT; in AddKeyMappings() 42 (*key_mapping)[cvd::xk::AltRight] = KEY_RIGHTALT; in AddKeyMappings() 43 (*key_mapping)[cvd::xk::ControlRight] = KEY_RIGHTCTRL; in AddKeyMappings() 44 (*key_mapping)[cvd::xk::ShiftRight] = KEY_RIGHTSHIFT; in AddKeyMappings() 45 (*key_mapping)[cvd::xk::MetaLeft] = KEY_LEFTMETA; in AddKeyMappings() 46 (*key_mapping)[cvd::xk::MetaRight] = KEY_RIGHTMETA; in AddKeyMappings() 47 (*key_mapping)[cvd::xk::MultiKey] = KEY_COMPOSE; in AddKeyMappings() [all …]
|
/device/google/cuttlefish_common/host/commands/launch/ |
D | launch.h | 13 cvd::Command GetIvServerCommand(const vsoc::CuttlefishConfig& config); 14 cvd::Command GetKernelLogMonitorCommand(const vsoc::CuttlefishConfig& config, 15 cvd::SharedFD* boot_events_pipe, 16 cvd::SharedFD* adbd_events_pipe); 18 cvd::ProcessMonitor* process_monitor); 20 cvd::ProcessMonitor* process_monitor); 22 cvd::ProcessMonitor* process_monitor, 23 std::function<bool(cvd::MonitorEntry*)> callback); 25 cvd::ProcessMonitor* process_monitor, 26 std::function<bool(cvd::MonitorEntry*)> callback); [all …]
|
D | launch.cc | 12 using cvd::LauncherExitCodes; 13 using cvd::MonitorEntry; 23 cvd::SharedFD CreateIvServerUnixSocket(const std::string& path) { in CreateIvServerUnixSocket() 24 return cvd::SharedFD::SocketLocalServer(path.c_str(), false, SOCK_STREAM, in CreateIvServerUnixSocket() 78 cvd::OnSocketReadyCb GetOnSubprocessExitCallback( in GetOnSubprocessExitCallback() 81 return cvd::ProcessMonitor::RestartOnExitCb; in GetOnSubprocessExitCallback() 83 return cvd::ProcessMonitor::DoNotMonitorCb; in GetOnSubprocessExitCallback() 94 return config.logcat_mode() == cvd::kLogcatVsockMode; in LogcatReceiverEnabled() 108 cvd::Command GetIvServerCommand(const vsoc::CuttlefishConfig& config) { in GetIvServerCommand() 110 auto actual_width = cvd::AlignToPowerOf2(config.x_res() * 4, 4);// align to 16 in GetIvServerCommand() [all …]
|
D | main.cc | 64 using cvd::LauncherExitCodes; 68 cvd::OnSocketReadyCb GetOnSubprocessExitCallback( in GetOnSubprocessExitCallback() 71 return cvd::ProcessMonitor::RestartOnExitCb; in GetOnSubprocessExitCallback() 73 return cvd::ProcessMonitor::DoNotMonitorCb; in GetOnSubprocessExitCallback() 82 CvdBootStateMachine(cvd::SharedFD fg_launcher_pipe) in CvdBootStateMachine() 86 bool OnBootEvtReceived(cvd::SharedFD boot_events_pipe) { in OnBootEvtReceived() 134 void SendExitCode(cvd::LauncherExitCodes exit_code) { in SendExitCode() 143 SendExitCode(cvd::LauncherExitCodes::kSuccess); in MaybeWriteToForegroundLauncher() 145 SendExitCode(cvd::LauncherExitCodes::kVirtualDeviceBootFailed); in MaybeWriteToForegroundLauncher() 147 SendExitCode(cvd::LauncherExitCodes::kE2eTestFailed); in MaybeWriteToForegroundLauncher() [all …]
|
D | data_image.cc | 18 int fsck_status = cvd::execute({"/sbin/e2fsck", "-y", "-f", data_image}); in ForceFsckImage() 28 auto file_mb = cvd::FileSize(data_image) >> 20; in ResizeImage() 39 cvd::SharedFD::Open(data_image, O_RDWR)->Truncate(raw_target); in ResizeImage() 49 int resize_status = cvd::execute({"/sbin/resize2fs", data_image}); in ResizeImage() 71 cvd::execute({"/bin/dd", "if=/dev/zero", of, "bs=1M", count}); in CreateBlankImage() 73 cvd::execute({"/sbin/mkfs", "-t", image_fmt, image}, {"PATH=/sbin"}); in CreateBlankImage() 79 bool data_exists = cvd::FileHasContent(data_image.c_str()); in ApplyDataImagePolicy() 115 cvd::RemoveFile(data_image.c_str()); in ApplyDataImagePolicy()
|
/device/google/cuttlefish_common/guest/hals/hwcomposer/vsoc/ |
D | stats_keeper.h | 29 namespace cvd { 33 CompositionData(cvd::time::MonotonicTimePoint time_point, int num_prepares, in CompositionData() 35 cvd::time::Nanoseconds prepare_time, in CompositionData() 36 cvd::time::Nanoseconds set_calls_time) in CompositionData() 44 cvd::time::MonotonicTimePoint time_point() const { return time_point_; } in time_point() 52 cvd::time::Nanoseconds prepare_time() const { return prepare_time_; } in prepare_time() 54 cvd::time::Nanoseconds set_calls_time() const { return set_calls_time_; } in set_calls_time() 57 cvd::time::MonotonicTimePoint time_point_; 61 cvd::time::Nanoseconds prepare_time_; 62 cvd::time::Nanoseconds set_calls_time_; [all …]
|
/device/google/cuttlefish_common/common/libs/utils/ |
D | simulated_buffer.h | 53 cvd::time::MonotonicTimePointFactory* clock = 54 cvd::time::MonotonicTimePointFactory::GetInstance()) : 70 const cvd::time::MonotonicTimePoint GetLastUpdatedTime() const { in GetLastUpdatedTime() 78 virtual void SleepUntilTime(const cvd::time::MonotonicTimePoint& in) { in SleepUntilTime() 99 cvd::time::MonotonicTimePoint now; in Update() 116 cvd::time::Seconds seconds(now - base_time_); in Update() 121 cvd::time::Nanoseconds(now - base_time_).count() * in Update() 122 items_per_second_ / cvd::time::kNanosecondsPerSecond + in Update() 136 cvd::time::MonotonicTimePoint CalculateItemTime(int64_t item) { in CalculateItemTime() 139 return base_time_ + cvd::time::Seconds(seconds) + in CalculateItemTime() [all …]
|
D | subprocess.cpp | 35 const std::map<cvd::Subprocess::StdIOChannel, int>& redirects, in validate_redirects() 36 const std::map<cvd::SharedFD, int>& inherited_fds) { in validate_redirects() 54 void do_redirects(const std::map<cvd::Subprocess::StdIOChannel, int>& redirects) { in do_redirects() 62 cvd::Subprocess subprocess_impl( in subprocess_impl() 65 const std::map<cvd::Subprocess::StdIOChannel, int>& redirects, in subprocess_impl() 66 const std::map<cvd::SharedFD, int>& inherited_fds, in subprocess_impl() 71 cvd::SharedFD parent_socket, child_socket; in subprocess_impl() 73 if (!cvd::SharedFD::SocketPair(AF_LOCAL, SOCK_STREAM, 0, &parent_socket, in subprocess_impl() 76 return cvd::Subprocess(-1, {}); in subprocess_impl() 84 return cvd::Subprocess(-1, {}); in subprocess_impl() [all …]
|
/device/google/cuttlefish_common/guest/hals/audio/legacy/ |
D | vsoc_audio_input_stream.cpp | 33 namespace cvd { namespace 52 cvd::GceAudio* dev, audio_devices_t devices, const audio_config& config) in GceAudioInputStream() 59 cvd::thunk<audio_stream, &GceAudioInputStream::GetSampleRate>; in GceAudioInputStream() 61 cvd::thunk<audio_stream, &GceAudioInputStream::SetSampleRate>; in GceAudioInputStream() 63 cvd::thunk<audio_stream, &GceAudioInputStream::GetBufferSize>; in GceAudioInputStream() 65 cvd::thunk<audio_stream, &GceAudioInputStream::GetChannels>; in GceAudioInputStream() 66 common.get_device = cvd::thunk<audio_stream, &GceAudioInputStream::GetDevice>; in GceAudioInputStream() 67 common.set_device = cvd::thunk<audio_stream, &GceAudioInputStream::SetDevice>; in GceAudioInputStream() 68 common.get_format = cvd::thunk<audio_stream, &GceAudioInputStream::GetFormat>; in GceAudioInputStream() 69 common.set_format = cvd::thunk<audio_stream, &GceAudioInputStream::SetFormat>; in GceAudioInputStream() [all …]
|
D | vsoc_audio_output_stream.cpp | 51 namespace cvd { namespace 85 *nstime = cvd::time::Nanoseconds( in GetNextWriteTimestamp() 280 cvd::thunk<audio_stream, &GceAudioOutputStream::GetSampleRate>; in Open() 282 cvd::thunk<audio_stream, &GceAudioOutputStream::SetSampleRate>; in Open() 284 cvd::thunk<audio_stream, &GceAudioOutputStream::GetBufferSize>; in Open() 286 cvd::thunk<audio_stream, &GceAudioOutputStream::GetChannels>; in Open() 287 out->common.get_format = cvd::thunk<audio_stream, &GceAudioOutputStream::GetFormat>; in Open() 288 out->common.set_format = cvd::thunk<audio_stream, &GceAudioOutputStream::SetFormat>; in Open() 289 out->common.standby = cvd::thunk<audio_stream, &GceAudioOutputStream::Standby>; in Open() 290 out->common.dump = cvd::thunk<audio_stream, &GceAudioOutputStream::Dump>; in Open() [all …]
|
D | vsoc_audio.cpp | 39 using cvd::LockGuard; 40 using cvd::Mutex; 42 namespace cvd { namespace 293 rval->common.close = cvd::thunk<hw_device_t, &GceAudio::Close>; in Open() 302 cvd::thunk<audio_hw_device, &GceAudio::GetSupportedDevices>; in Open() 304 rval->init_check = cvd::thunk<audio_hw_device, &GceAudio::InitCheck>; in Open() 307 cvd::thunk<audio_hw_device, &GceAudio::SetVoiceVolume>; in Open() 309 cvd::thunk<audio_hw_device, &GceAudio::SetMasterVolume>; in Open() 311 cvd::thunk<audio_hw_device, &GceAudio::GetMasterVolume>; in Open() 315 cvd::thunk<audio_hw_device, &GceAudio::SetMasterMute>; in Open() [all …]
|
/device/google/cuttlefish_common/guest/hals/sensors/ |
D | vsoc_sensors.h | 25 namespace cvd { 180 cvd::time::MonotonicTimePoint current_deadline_; 188 cvd::SharedFD sensor_listener_socket_; 190 cvd::SharedFD control_receiver_socket_; 192 cvd::SharedFD control_sender_socket_; 197 cvd::Mutex sensor_state_lock_; 199 cvd::ConditionVariable deadline_change_; 207 const static cvd::time::Nanoseconds kInjectedEventWaitTime; 225 cvd::time::MonotonicTimePoint UpdateDeadline();
|
/device/google/cuttlefish_common/host/commands/ivserver/ |
D | vsocsharedmem.h | 34 explicit Region(const char *device_name, const cvd::SharedFD &host_fd, in Region() 35 const cvd::SharedFD &guest_fd) in Region() 38 cvd::SharedFD host_fd; 39 cvd::SharedFD guest_fd; 48 cvd::SharedFD *guest_to_host, 49 cvd::SharedFD *host_to_guest) const = 0; 51 virtual const cvd::SharedFD &SharedMemFD() const = 0;
|
D | hald_client_test.cc | 46 hald_server_socket_ = cvd::SharedFD::SocketLocalServer( in SetUp() 48 test_socket_ = cvd::SharedFD::SocketLocalClient(socket_location.c_str(), in SetUp() 51 cvd::SharedFD::Accept(*hald_server_socket_, nullptr, nullptr); in SetUp() 82 cvd::SharedFD hald_server_socket_; 83 cvd::SharedFD hald_socket_; 84 cvd::SharedFD test_socket_; 125 cvd::SharedFD host_fd( in TEST_F() 126 cvd::SharedFD::Open(temp.c_str(), O_CREAT | O_RDWR, 0666)); in TEST_F() 130 cvd::SharedFD guest_fd( in TEST_F() 131 cvd::SharedFD::Open(temp.c_str(), O_CREAT | O_RDWR, 0666)); in TEST_F() [all …]
|
D | ivserver.cc | 33 qemu_channel_ = cvd::SharedFD::Dup(qemu_channel_fd); in IVServer() 38 qemu_channel_ = cvd::SharedFD::SocketLocalServer( in IVServer() 45 client_channel_ = cvd::SharedFD::Dup(client_channel_fd); in IVServer() 50 client_channel_ = cvd::SharedFD::SocketLocalServer( in IVServer() 59 cvd::SharedFDSet rset; in Serve() 62 cvd::Select(&rset, nullptr, nullptr, nullptr); in Serve() 78 *vsoc_shmem_, cvd::SharedFD::Accept(*client_channel_, nullptr, nullptr)); in HandleNewClientConnection() 86 *vsoc_shmem_, cvd::SharedFD::Accept(*qemu_channel_, nullptr, nullptr)); in HandleNewQemuConnection()
|
D | vsocsharedmem.cc | 45 cvd::SharedFD *guest_to_host, 46 cvd::SharedFD *host_to_guest) const override; 48 const cvd::SharedFD &SharedMemFD() const override; 55 cvd::SharedFD shared_mem_fd_; 66 : shared_mem_fd_(cvd::SharedFD::Open(path.c_str(), O_RDWR)), in VSoCSharedMemoryImpl() 73 const cvd::SharedFD &VSoCSharedMemoryImpl::SharedMemFD() const { in SharedMemFD() 83 const std::string ®ion_name, cvd::SharedFD *guest_to_host, in GetEventFdPairForRegion() 84 cvd::SharedFD *host_to_guest) const { in GetEventFdPairForRegion() 109 auto host_fd = cvd::SharedFD::Event(0, EFD_NONBLOCK); in New() 115 auto guest_fd = cvd::SharedFD::Event(0, EFD_NONBLOCK); in New()
|
D | qemu_client.h | 33 const cvd::SharedFD &connection); 35 cvd::SharedFD client_socket() const { return client_socket_; } in client_socket() 53 cvd::SharedFD client_socket_; 56 QemuClient(cvd::SharedFD qemu_listener_socket); 63 bool SendSocketInfo(QemuConstants message, const cvd::SharedFD &socket);
|
/device/google/cuttlefish_common/common/frontend/socket_vsock_proxy/ |
D | main.cpp | 39 explicit SocketSender(cvd::SharedFD socket) : socket_{socket} {} in SocketSender() 73 cvd::SharedFD socket_; 78 explicit SocketReceiver(cvd::SharedFD socket) : socket_{socket} {} in SocketReceiver() 96 cvd::SharedFD socket_; 129 void HandleConnection(cvd::SharedFD vsock, in HandleConnection() 130 cvd::SharedFD socket) { in HandleConnection() 141 auto server = cvd::SharedFD::SocketLocalServer(FLAGS_tcp_port, SOCK_STREAM); in host() 146 auto client_socket = cvd::SharedFD::Accept(*server); in host() 148 cvd::SharedFD vsock_socket = cvd::SharedFD::VsockClient( in host() 170 cvd::SharedFD OpenSocketConnection() { in OpenSocketConnection() [all …]
|
/device/google/cuttlefish_common/common/libs/threads/ |
D | cuttlefish_thread_test.cpp | 22 using cvd::ConditionVariable; 23 using cvd::Mutex; 24 using cvd::ScopedThread; 25 using cvd::time::MonotonicTimePoint; 26 using cvd::time::Milliseconds; 55 ScopedThread thread_a(cvd::thunk<void, &MutexTest::FastThread>, this); in Run() 56 ScopedThread thread_b(cvd::thunk<void, &MutexTest::SlowThread>, this); in Run() 109 cvd::thunk<void, &NotifyOneTest::SignalThread>, this); in Run() 111 cvd::thunk<void, &NotifyOneTest::WaitThread>, this); in Run() 113 cvd::thunk<void, &NotifyOneTest::WaitThread>, this); in Run() [all …]
|
/device/google/cuttlefish_common/guest/commands/usbforward/ |
D | usb_server.h | 38 USBServer(const cvd::SharedFD& fd); 85 std::unique_ptr<cvd::ScopedThread> libusb_thread_; 86 cvd::Mutex write_mutex_; 87 cvd::SharedFD fd_; 88 cvd::SharedFD device_event_fd_; 89 cvd::SharedFD thread_event_fd_; 91 cvd::Mutex requests_mutex_;
|
D | usb_server.cpp | 115 USBServer::USBServer(const cvd::SharedFD& fd) in USBServer() 117 device_event_fd_{cvd::SharedFD::Event(0, 0)}, 118 thread_event_fd_{cvd::SharedFD::Event(0, 0)} {} 127 cvd::LockGuard<cvd::Mutex> lock(write_mutex_); in HandleDeviceList() 147 cvd::LockGuard<cvd::Mutex> lock(write_mutex_); in HandleAttach() 153 cvd::LockGuard<cvd::Mutex> lock(write_mutex_); in HandleHeartbeat() 195 cvd::LockGuard<cvd::Mutex> lock(requests_mutex_); in HandleControlTransfer() 238 cvd::LockGuard<cvd::Mutex> lock(requests_mutex_); in HandleDataTransfer() 252 cvd::LockGuard<cvd::Mutex> lock(write_mutex_); in OnTransferComplete() 273 cvd::LockGuard<cvd::Mutex> lock(requests_mutex_); in OnTransferComplete() [all …]
|
/device/google/cuttlefish_common/host/commands/kernel_log_monitor/ |
D | main.cc | 40 std::vector<cvd::SharedFD> SubscribersFromCmdline() { in SubscribersFromCmdline() 50 auto fds = cvd::StrSplit(FLAGS_subscriber_fds, ','); in SubscribersFromCmdline() 51 std::vector<cvd::SharedFD> shared_fds; in SubscribersFromCmdline() 54 auto shared_fd = cvd::SharedFD::Dup(fd); in SubscribersFromCmdline() 80 cvd::SharedFD server; in main() 83 server = cvd::SharedFD::SocketLocalServer(log_name.c_str(), false, in main() 86 server = cvd::SharedFD::Dup(FLAGS_log_server_fd); in main() 119 cvd::SharedFDSet fd_read; in main() 124 int ret = cvd::Select(&fd_read, nullptr, nullptr, nullptr); in main()
|
D | kernel_log_server.h | 49 KernelLogServer(cvd::SharedFD server_socket, 57 void BeforeSelect(cvd::SharedFDSet* fd_read) const; 61 void AfterSelect(const cvd::SharedFDSet& fd_read); 72 cvd::SharedFD server_fd_; 73 cvd::SharedFD client_fd_; 74 cvd::SharedFD log_fd_;
|
/device/google/cuttlefish_common/host/libs/vm_manager/ |
D | crosvm_manager.cpp | 37 cvd::SharedFD ConnectToLogMonitor(const std::string& log_monitor_name) { in ConnectToLogMonitor() 38 return cvd::SharedFD::SocketLocalClient(log_monitor_name.c_str(), false, in ConnectToLogMonitor() 42 void AddTapFdParameter(cvd::Command* crosvm_cmd, const std::string& tap_name) { in AddTapFdParameter() 43 auto tap_fd = cvd::OpenTapInterface(tap_name); in AddTapFdParameter() 66 cvd::Command CrosvmManager::StartCommand() { in StartCommand() 75 cvd::Command command(config_->crosvm_binary()); in StartCommand() 121 command.RedirectStdIO(cvd::Subprocess::StdIOChannel::kStdOut, in StartCommand() 125 auto dev_null = cvd::SharedFD::Open("/dev/null", O_RDONLY); in StartCommand() 127 command.RedirectStdIO(cvd::Subprocess::StdIOChannel::kStdIn, dev_null); in StartCommand() 139 cvd::Command command(config_->crosvm_binary()); in Stop()
|
/device/google/cuttlefish_common/guest/commands/rename_netiface/ |
D | main.cpp | 38 auto factory = cvd::NetlinkClientFactory::Default(); in main() 39 std::unique_ptr<cvd::NetlinkClient> nl(factory->New(NETLINK_ROUTE)); in main() 40 std::unique_ptr<cvd::NetworkInterfaceManager> nm( in main() 41 cvd::NetworkInterfaceManager::New(factory)); in main() 42 std::unique_ptr<cvd::NetworkInterface> ni(nm->Open(new_name, name)); in main()
|