--- nono/host/hostdevice.h 2026/04/29 17:05:11 1.1 +++ nono/host/hostdevice.h 2026/04/29 17:05:30 1.1.1.5 @@ -26,12 +26,11 @@ class HostDevice : public ThreadDevice static const int DATA_FROM_VM = 1; // VM からの着信 static const int DATA_FROM_OUTER = 2; // 外部からの着信 static const int LISTEN_SOCKET = 3; // 待受ソケット着信 - static const int DATA_FROM_SIGNAL = 4; // シグナル受信 protected: - HostDevice(const std::string& objname_); + HostDevice(Device *parent_, uint objid_); public: - virtual ~HostDevice() override; + ~HostDevice() override; bool Init() override; @@ -43,10 +42,8 @@ class HostDevice : public ThreadDevice // NetDriver からのディスクリプタの登録 int AddOuter(int fd); int DelOuter(int fd); - int AddSignal(int rfd, int wfd); int AddListen(int ls, int action); - void SetCallbackDevice(Device *); void SetRxCallback(DeviceCallback_t func); void SetAcceptCallback(DeviceCallback_t func); @@ -66,6 +63,9 @@ class HostDevice : public ThreadDevice // ログ出力 void putlogn(const char *fmt, ...) const override __printflike(2, 3); + // 親デバイス + Device *parent {}; + autofd kq {}; // VM からの送信用パイプ @@ -73,7 +73,6 @@ class HostDevice : public ThreadDevice autofd wpipe {}; // 各種通知コールバック - Device *dev {}; DeviceCallback_t rx_func {}; DeviceCallback_t accept_func {};