diff --git a/include/ucore/iomux.h b/include/ucore/iomux.h index 2cef14c..1d60fe0 100644 --- a/include/ucore/iomux.h +++ b/include/ucore/iomux.h @@ -110,7 +110,11 @@ int iomux_unregister_fd(struct IOMux *mux, struct IOMuxFD *fd); */ int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd); - +/** Retreive the UCoreClock associated with the IOMux. + * Either a suitable internal clock is provided, or the + * same clock as created by iomux_create_ex. + */ +struct UCoreClock *iomux_get_clock(struct IOMux *mux); /** * Convenience macro for setting the new event */ diff --git a/src/iomux_impl.c b/src/iomux_impl.c index 653a839..421fd91 100644 --- a/src/iomux_impl.c +++ b/src/iomux_impl.c @@ -139,6 +139,11 @@ int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd) return mux->update_events_impl(mux, fd); } +struct UCoreClock *iomux_get_clock(struct IOMux *mux) +{ + return mux->uclock; +} + struct UCTimers *iomux_get_timers(struct IOMux *mux) { return &mux->timers;