move iomux_impl.h to src/ dir, it's an implementation detail

This commit is contained in:
Nils O. Selåsdal
2013-06-19 18:51:12 +02:00
parent b4f9ecafe2
commit 012a5b1377
4 changed files with 5 additions and 5 deletions
+49
View File
@@ -0,0 +1,49 @@
#ifndef IO_MUX_IMPL_H_
#define IO_MUX_IMPL_H_
#include "ucore/iomux.h"
#include "ucore/timers.h"
/** struct for IOMux implementations */
struct IOMux {
/* TImer instance */
struct UCTimers timers;
/**
* Clock used for driving timers, and
* providing timeouts for the mux
*/
struct UCoreClock *uclock;
/* Used by mux implementations to hold their own data/instance */
void *instance;
/** Run one iteration of the mux.
* The mux implementation must honor the timeout, if given.
* The mux implementation must call iomux_timers_run after the
* polling has occured (or if it's polling times out)
*
* @param mux The IOMux instance
* @param timeout absolute time of a timeout - after which timers should run.
* If timeout is NULL, no timeout should be set on the poll.
*/
int (*run_impl)(struct IOMux *mux, struct timeval *timeout);
/* Deallocate the instance specific part of the IOMux */
void (*delete_impl)(struct IOMux *mux);
/** Register an IOMuxFD for events*/
int (*register_fd_impl)(struct IOMux *mux, struct IOMuxFD *fd);
/** Unregister an IOMuxFD */
int (*unregister_fd_impl)(struct IOMux *mux, struct IOMuxFD *fd);
/** Update an IOMuxFD (due to its events ('what') has changed*/
int (*update_events_impl)(struct IOMux *mux, struct IOMuxFD *fd);
};
int iomux_select_init(struct IOMux *mux);
int iomux_epoll_init(struct IOMux *mux);
int iomux_timers_run(struct IOMux *mux);
#endif