Lines Matching refs:fdevent
43 struct fdevent;
46 typedef void (*fd_func2)(struct fdevent* fde, unsigned events, void* userdata);
48 void invoke_fde(struct fdevent* fde, unsigned events);
49 std::string dump_fde(const fdevent* fde);
52 fdevent* fde;
54 fdevent_event(fdevent* pfde, unsigned ev) : fde(pfde), events(ev) {} in fdevent_event()
57 struct fdevent final {
75 fdevent* Create(unique_fd fd, std::variant<fd_func, fd_func2> func, void* arg);
80 unique_fd Destroy(fdevent* fde);
83 virtual void Register(fdevent*) = 0;
84 virtual void Unregister(fdevent*) = 0;
88 virtual void Set(fdevent* fde, unsigned events) = 0;
89 void Add(fdevent* fde, unsigned events);
90 void Del(fdevent* fde, unsigned events);
96 void SetTimeout(fdevent* fde, std::optional<std::chrono::milliseconds> timeout);
130 std::map<int, fdevent> installed_fdevents_;
137 std::set<fdevent*> fdevent_set_;
141 fdevent* fdevent_create(int fd, fd_func func, void* arg);
142 fdevent* fdevent_create(int fd, fd_func2 func, void* arg);
144 unique_fd fdevent_release(fdevent* fde);
145 void fdevent_destroy(fdevent* fde);
147 void fdevent_set(fdevent *fde, unsigned events);
148 void fdevent_add(fdevent *fde, unsigned events);
149 void fdevent_del(fdevent *fde, unsigned events);
150 void fdevent_set_timeout(fdevent* fde, std::optional<std::chrono::milliseconds> timeout);