ioqueue.hh

来自「一个mips虚拟机非常好代码,使用C++来编写的,希望大家多学学,」· HH 代码 · 共 35 行

HH
35
字号
#ifndef ioqueue_hh_included#define ioqueue_hh_included#include <sys/types.h>// class implemented by devices interested in IO notificationsclass IOListener{	friend class IOQueue;	IOListener *io_next;	virtual void io_poll() = 0;protected:	int io_fd;};class IOQueue{	IOListener *queue;	fd_set fds;	int max_fd;public:	IOQueue();	void insert(IOListener *listener);	void remove(IOListener *listener);	void poll();};// Master IO queue polled on SIGIOextern IOQueue *ioqueue;#endif // ioqueue_hh_includd

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?