event_base_active_by_fd

This commit is contained in:
Greg Hazel 2013-01-16 16:31:08 -08:00
parent 21c962e087
commit 865a14261c
2 changed files with 17 additions and 0 deletions

View File

@ -3393,6 +3393,14 @@ event_base_dump_events(struct event_base *base, FILE *output)
EVBASE_RELEASE_LOCK(base, th_base_lock); EVBASE_RELEASE_LOCK(base, th_base_lock);
} }
void
event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events)
{
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
evmap_io_active_(base, fd, events);
EVBASE_RELEASE_LOCK(base, th_base_lock);
}
void void
event_base_add_virtual_(struct event_base *base) event_base_add_virtual_(struct event_base *base)
{ {

View File

@ -1338,6 +1338,15 @@ void event_set_mem_functions(
void event_base_dump_events(struct event_base *, FILE *); void event_base_dump_events(struct event_base *, FILE *);
/**
Activates all events for the given fd and event mask.
@param fd An fd or signal
@param events One or more EV_* flags
*/
void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events);
/** /**
* Callback for iterating events in an event base via event_base_foreach_event * Callback for iterating events in an event base via event_base_foreach_event
*/ */