Skip to content

Commit

Permalink
Use struct ev_loop in selector.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 17, 2019
1 parent 52795cf commit 8718bdd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ext/nio4r/selector.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ static VALUE NIO_Selector_close_synchronized(VALUE *args);
static VALUE NIO_Selector_closed_synchronized(VALUE *args);

static int NIO_Selector_run(struct NIO_Selector *selector, VALUE timeout);
static void NIO_Selector_timeout_callback(ev_loop *ev_loop, struct ev_timer *timer, int revents);
static void NIO_Selector_wakeup_callback(ev_loop *ev_loop, struct ev_io *io, int revents);
static void NIO_Selector_timeout_callback(struct ev_loop *ev_loop, struct ev_timer *timer, int revents);
static void NIO_Selector_wakeup_callback(struct ev_loop *ev_loop, struct ev_io *io, int revents);

/* Default number of slots in the buffer for selected monitors */
#define INITIAL_READY_BUFFER 32
Expand Down Expand Up @@ -530,12 +530,12 @@ static VALUE NIO_Selector_is_empty(VALUE self)


/* Called whenever a timeout fires on the event loop */
static void NIO_Selector_timeout_callback(ev_loop *ev_loop, struct ev_timer *timer, int revents)
static void NIO_Selector_timeout_callback(struct ev_loop *ev_loop, struct ev_timer *timer, int revents)
{
}

/* Called whenever a wakeup request is sent to a selector */
static void NIO_Selector_wakeup_callback(ev_loop *ev_loop, struct ev_io *io, int revents)
static void NIO_Selector_wakeup_callback(struct ev_loop *ev_loop, struct ev_io *io, int revents)
{
char buffer[128];
struct NIO_Selector *selector = (struct NIO_Selector *)io->data;
Expand All @@ -546,7 +546,7 @@ static void NIO_Selector_wakeup_callback(ev_loop *ev_loop, struct ev_io *io, int
}

/* libev callback fired whenever a monitor gets an event */
void NIO_Selector_monitor_callback(ev_loop *ev_loop, struct ev_io *io, int revents)
void NIO_Selector_monitor_callback(struct ev_loop *ev_loop, struct ev_io *io, int revents)
{
struct NIO_Monitor *monitor_data = (struct NIO_Monitor *)io->data;
struct NIO_Selector *selector = monitor_data->selector;
Expand Down

0 comments on commit 8718bdd

Please sign in to comment.