Convert iomux to use an UCoreClock

This commit is contained in:
Nils O. Selåsdal
2013-03-02 21:42:19 +01:00
parent b0e9988aa5
commit 54678cf94b
3 changed files with 23 additions and 10 deletions
+7
View File
@@ -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);
+5 -3
View File
@@ -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;