libevent源码分析:evmap_io_active_函数 evmap_io_active_函数用于将激活指定文件描述符上的事件1 void 2 evmap_io_active_(struct event_base *base, evutil_socket_t fd, short events) 3 { 4 struct event_io_map *io = &base->io;
functions->push(f);// Add an event and activate it to interrupt the event loop.// TODO(jmlvanre): after libevent v 2.1 we can use// event_self_cbarg instead of re-assigning the event. For now we// manually re-assign the event to pass in the pointer to the// event itself as ...
1 void 2 event_active_nolock_(struct event *ev, int res, short ncalls) 3 { 4 struct event_base *base; 5 6 event_debug(("event_active: %p (fd "EV_SOCK_FMT"), res %d, callback %p", 7 ev, EV_SOCK_ARG(ev->ev_fd), (int)res, ev->ev_callback)); 8 9 base = ev->ev...