mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Add event_base_active_by_signal by analogy
This commit is contained in:
parent
5c9da9a8a8
commit
486594337a
9
event.c
9
event.c
@ -3640,6 +3640,15 @@ event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short event
|
||||
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
||||
}
|
||||
|
||||
void
|
||||
event_base_active_by_signal(struct event_base *base, int sig)
|
||||
{
|
||||
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
|
||||
evmap_signal_active_(base, sig, 1);
|
||||
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
event_base_add_virtual_(struct event_base *base)
|
||||
{
|
||||
|
@ -1473,6 +1473,13 @@ void event_base_dump_events(struct event_base *, FILE *);
|
||||
*/
|
||||
void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events);
|
||||
|
||||
/**
|
||||
Activates all pending signals with a given signal number
|
||||
|
||||
@param base the event_base on which to activate the events.
|
||||
@param fd The signal to active events on.
|
||||
*/
|
||||
void event_base_active_by_signal(struct event_base *base, int sig);
|
||||
|
||||
/**
|
||||
* Callback for iterating events in an event base via event_base_foreach_event
|
||||
|
Loading…
x
Reference in New Issue
Block a user