Implement generalied IOMux implementation operations
Fix serious bug in iomix_timers_run
This commit is contained in:
+10
-6
@@ -199,6 +199,14 @@ static void iomux_select_delete(struct IOMux *mux)
|
||||
mux->instance = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct IOMuxOps select_ops = {
|
||||
.run_impl = iomux_select_run,
|
||||
.delete_impl = iomux_select_delete,
|
||||
.register_fd_impl = iomux_select_register_fd,
|
||||
.unregister_fd_impl = iomux_select_unregister_fd,
|
||||
.update_events_impl = iomux_select_update_events,
|
||||
};
|
||||
|
||||
int iomux_select_init(struct IOMux *mux)
|
||||
{
|
||||
@@ -208,12 +216,8 @@ int iomux_select_init(struct IOMux *mux)
|
||||
|
||||
mux_select->max_fd = -1;
|
||||
|
||||
mux->instance = mux_select;
|
||||
mux->run_impl = iomux_select_run;
|
||||
mux->delete_impl = iomux_select_delete;
|
||||
mux->register_fd_impl = iomux_select_register_fd;
|
||||
mux->unregister_fd_impl = iomux_select_unregister_fd;
|
||||
mux->update_events_impl = iomux_select_update_events;
|
||||
mux->instance = mux_select;
|
||||
mux->ops = select_ops;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user