• Home
  • Raw
  • Download

Lines Matching defs:UsbFfsConnection

171 struct UsbFfsConnection : public Connection {  struct
172 UsbFfsConnection(unique_fd control, unique_fd read, unique_fd write, in UsbFfsConnection() argument
194 ~UsbFfsConnection() { in ~UsbFfsConnection() argument
209 virtual bool Write(std::unique_ptr<apacket> packet) override final { in Write()
246 PLOG(FATAL) << "failed to notify worker eventfd to stop UsbFfsConnection"; in Stop() argument
266 // eventually result in the transport being destroyed, which will result in UsbFfsConnection in StartMonitor() argument
413 void StartWorker() { in StartWorker()
439 void StopWorker() { in StopWorker()
467 void PrepareReadBlock(IoBlock* block, uint64_t id) { in PrepareReadBlock()
475 IoBlock CreateReadBlock(uint64_t id) { in CreateReadBlock()
488 void ReadEvents() { in ReadEvents()
519 void HandleRead(TransferId id, int64_t size) { in HandleRead()
543 void ProcessRead(IoBlock* block) { in ProcessRead()
575 bool SubmitRead(IoBlock* block) { in SubmitRead()
593 void HandleWrite(TransferId id) { in HandleWrite()
608 std::unique_ptr<IoBlock> CreateWriteBlock(std::shared_ptr<Block> payload, size_t offset, in CreateWriteBlock()
625 std::unique_ptr<IoBlock> CreateWriteBlock(Block payload, uint64_t id) { in CreateWriteBlock()
631 void SubmitWrites() REQUIRES(write_mutex_) { in SubmitWrites()
663 void HandleError(const std::string& error) { in HandleError()
672 std::thread monitor_thread_;
674 bool worker_started_;
675 std::thread worker_thread_;
677 std::atomic<bool> stopped_;
678 std::promise<void> destruction_notifier_;
679 std::once_flag error_flag_;
681 unique_fd worker_event_fd_;
682 unique_fd monitor_event_fd_;
684 ScopedAioContext aio_context_;
685 unique_fd control_fd_;
686 unique_fd read_fd_;
687 unique_fd write_fd_;
689 std::optional<amessage> incoming_header_;
690 IOVector incoming_payload_;
692 std::array<IoBlock, kUsbReadQueueDepth> read_requests_;
693 IOVector read_data_;
696 size_t next_read_id_ = 0;
699 size_t needed_read_id_ = 0;
701 std::mutex write_mutex_;
706 static constexpr int kInterruptionSignal = SIGUSR1;