Android-cuttlefish cvd tool
Classes | Namespaces | Functions
boot_state_machine.cc File Reference
#include "cuttlefish/host/commands/run_cvd/boot_state_machine.h"
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <stdint.h>
#include <sys/poll.h>
#include <sys/stat.h>
#include <unistd.h>
#include <chrono>
#include <condition_variable>
#include <cstdlib>
#include <mutex>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <thread>
#include <unordered_set>
#include <vector>
#include "absl/log/check.h"
#include "absl/log/log.h"
#include "absl/strings/str_cat.h"
#include "absl/time/time.h"
#include "android-base/file.h"
#include "fruit/component.h"
#include "fruit/fruit_forward_decls.h"
#include "fruit/macro.h"
#include "gflags/gflags.h"
#include "grpcpp/client_context.h"
#include "grpcpp/create_channel.h"
#include "grpcpp/security/credentials.h"
#include "grpcpp/support/status.h"
#include "cuttlefish/common/libs/fs/fd.h"
#include "cuttlefish/common/libs/fs/shared_buf.h"
#include "cuttlefish/common/libs/fs/shared_fd.h"
#include "cuttlefish/common/libs/utils/files.h"
#include "cuttlefish/common/libs/utils/tee_logging.h"
#include "cuttlefish/files/directory_contents.h"
#include "cuttlefish/files/file_exists.h"
#include "cuttlefish/host/commands/assemble_cvd/flags_defaults.h"
#include "cuttlefish/host/commands/kernel_log_monitor/kernel_log_server.h"
#include "cuttlefish/host/commands/kernel_log_monitor/utils.h"
#include "cuttlefish/host/commands/openwrt_control_server/openwrt_control.grpc.pb.h"
#include "cuttlefish/host/commands/openwrt_control_server/openwrt_control.pb.h"
#include "cuttlefish/host/commands/run_cvd/validate.h"
#include "cuttlefish/host/libs/command_util/runner/defs.h"
#include "cuttlefish/host/libs/command_util/util.h"
#include "cuttlefish/host/libs/config/config_constants.h"
#include "cuttlefish/host/libs/config/config_instance_derived.h"
#include "cuttlefish/host/libs/config/config_utils.h"
#include "cuttlefish/host/libs/config/cuttlefish_config.h"
#include "cuttlefish/host/libs/feature/feature.h"
#include "cuttlefish/host/libs/feature/kernel_log_pipe_provider.h"
#include "cuttlefish/host/libs/vm_manager/vm_manager.h"
#include "cuttlefish/io/write_exact.h"
#include "cuttlefish/posix/strerror.h"
#include "cuttlefish/process/command.h"
#include "cuttlefish/result/result.h"

Classes

class  cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine
 

Namespaces

namespace  cuttlefish
 
namespace  cuttlefish::anonymous_namespace{boot_state_machine.cc}
 

Functions

 DEFINE_int32 (reboot_notification_fd, CF_DEFAULTS_REBOOT_NOTIFICATION_FD, "A file descriptor to notify when boot completes.")
 
 DEFINE_int32 (boot_timeout_secs, 600, "Wait for completed boot before failing. On qemu and gem5, this " "timeout is disabled unless flag is specified")
 
Result< void > cuttlefish::anonymous_namespace{boot_state_machine.cc}::MoveSelfToCgroup (std::string_view id)
 
Result< void > cuttlefish::anonymous_namespace{boot_state_machine.cc}::MoveThreadsToCgroup (const std::string &from_path, const std::string &to_path)
 
Result< void > cuttlefish::anonymous_namespace{boot_state_machine.cc}::WattsonRebalanceThreads (const std::string &id)
 
Result< SharedFD > cuttlefish::anonymous_namespace{boot_state_machine.cc}::DaemonizeLauncher (const CuttlefishConfig &config)
 
Result< SharedFD > cuttlefish::anonymous_namespace{boot_state_machine.cc}::ProcessLeader (const CuttlefishConfig &config, const CuttlefishConfig::InstanceSpecific &instance, AutoSetup< ValidateTapDevices >::Type &)
 
fruit::Component< fruit::Required< const CuttlefishConfig, KernelLogPipeProvider, const CuttlefishConfig::InstanceSpecific, const vm_manager::VmManager, AutoSetup< ValidateTapDevices >::Type > > cuttlefish::bootStateMachineComponent ()
 

Function Documentation

◆ DEFINE_int32() [1/2]

DEFINE_int32 ( boot_timeout_secs  ,
600  ,
"Wait for completed boot before failing. On qemu and  gem5,
this " "timeout is disabled unless flag is specified"   
)

◆ DEFINE_int32() [2/2]

DEFINE_int32 ( reboot_notification_fd  ,
CF_DEFAULTS_REBOOT_NOTIFICATION_FD  ,
"A file descriptor to notify when boot completes."   
)