Convert iomux to use an UCoreClock
This commit is contained in:
@@ -41,6 +41,13 @@ struct IOMuxFD {
|
||||
*/
|
||||
struct IOMux *iomux_create(enum IOMUX_TYPE type);
|
||||
|
||||
/** Creates a new IOMux with a user supplied clock
|
||||
*
|
||||
* The supplied clock is used for the UCTimers associated
|
||||
* with the mux.
|
||||
*/
|
||||
struct IOMux *iomux_create_ex(enum IOMUX_TYPE type, struct UCoreClock *uclock);
|
||||
|
||||
/** Deletes the IOMux and frees its resources.
|
||||
* Can not be called from within a callback */
|
||||
void iomux_delete(struct IOMux *mux);
|
||||
|
||||
@@ -9,10 +9,12 @@ struct IOMux {
|
||||
/* TImer instance */
|
||||
struct UCTimers timers;
|
||||
|
||||
/* Current time. Updated before calling run_impl, and updated
|
||||
* by iomux_timers_run
|
||||
/**
|
||||
* Clock used for driving timers, and
|
||||
* providing timeouts for the mux
|
||||
*/
|
||||
struct timeval now;
|
||||
struct UCoreClock *uclock;
|
||||
|
||||
|
||||
/* Used by mux implementations to hold their own data/instance */
|
||||
void *instance;
|
||||
|
||||
Reference in New Issue
Block a user