Better naming in iomux
This commit is contained in:
+7
-7
@@ -54,8 +54,8 @@ void iomux_delete(struct IOMux *mux)
|
||||
}
|
||||
|
||||
//convert the difference between future and now
|
||||
static inline void future_to_interval(const struct timeval *future,
|
||||
const struct timeval *now,
|
||||
static inline void future_to_interval(const struct timeval *future,
|
||||
const struct timeval *now,
|
||||
struct timeval *result)
|
||||
{
|
||||
if (timercmp(future, now, >)) {
|
||||
@@ -66,7 +66,7 @@ static inline void future_to_interval(const struct timeval *future,
|
||||
}
|
||||
}
|
||||
|
||||
static int iomux_run_timers(struct IOMux *mux, struct timeval *timeout)
|
||||
static int iomux_next_timer_timeout(struct IOMux *mux, struct timeval *timeout)
|
||||
{
|
||||
struct timeval first_timer;
|
||||
|
||||
@@ -78,12 +78,12 @@ static int iomux_run_timers(struct IOMux *mux, struct timeval *timeout)
|
||||
first_timer.tv_sec, first_timer.tv_usec,
|
||||
timeout->tv_sec, timeout->tv_usec);
|
||||
*/
|
||||
|
||||
|
||||
assert(timeout->tv_sec >= 0);
|
||||
assert(timeout->tv_usec >= 0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ int iomux_run(struct IOMux *mux)
|
||||
struct timeval timeout;
|
||||
struct timeval *timeoutp;
|
||||
|
||||
if (iomux_run_timers(mux, &timeout)) {
|
||||
if (iomux_next_timer_timeout(mux, &timeout)) {
|
||||
timeoutp = &timeout;
|
||||
} else {
|
||||
timeoutp = NULL;
|
||||
@@ -147,7 +147,7 @@ int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd, unsigned int what
|
||||
assert(fd != NULL);
|
||||
assert(fd->callback != NULL);
|
||||
assert(fd->fd >= 0);
|
||||
|
||||
|
||||
if (fd->what != what) {
|
||||
fd->what = what;
|
||||
rc = mux->ops.update_events_impl(mux, fd);
|
||||
|
||||
Reference in New Issue
Block a user