/**
* timers_cleanup - free allocations within timers struct.
* @timers: the struct timers
*
* This frees any timer layers allocated during use.
/**
* timers_cleanup - free allocations within timers struct.
* @timers: the struct timers
*
* This frees any timer layers allocated during use.
* @when: when @timer expires.
*
* This efficiently adds @timer to @timers, to expire @when (rounded to
* TIMER_GRANULARITY nanoseconds).
* @when: when @timer expires.
*
* This efficiently adds @timer to @timers, to expire @when (rounded to
* TIMER_GRANULARITY nanoseconds).
- * @timer: the timer previously added with timer_add()
+ * @timer: the timer
+ *
+ * This efficiently removes @timer from @timers, if timer_add() was
+ * called. It can be called multiple times without bad effect, and
+ * can be called any time after timer_init().
*/
void timer_del(struct timers *timers, struct timer *timer);
/**
* timer_earliest - find out the first time when a timer will expire
* @timers: the struct timers
*/
void timer_del(struct timers *timers, struct timer *timer);
/**
* timer_earliest - find out the first time when a timer will expire
* @timers: the struct timers
*
* This returns false, and doesn't alter @first if there are no
* timers. Otherwise, it sets @first to the expiry time of the first
* timer (rounded to TIMER_GRANULARITY nanoseconds), and returns true.
*
* This returns false, and doesn't alter @first if there are no
* timers. Otherwise, it sets @first to the expiry time of the first
* timer (rounded to TIMER_GRANULARITY nanoseconds), and returns true.
- * @list will be initialized to the empty list, then all timers added
- * with a @when arg less than or equal to @expire will be added to it in
- * expiry order (within TIMER_GRANULARITY nanosecond precision).
+ * A timers added with a @when arg less than or equal to @expire will be
+ * returned (within TIMER_GRANULARITY nanosecond precision). If
+ * there are no timers due to expire, NULL is returned.
- * After this, @expire is considered the current time, and adding any
- * timers with @when before this value will be silently changed to
- * adding them with immediate expiration.
+ * After this returns NULL, @expire is considered the current time,
+ * and adding any timers with @when before this value will be silently
+ * changed to adding them with immediate expiration.
-void timers_expire(struct timers *timers,
- struct timespec expire,
- struct list_head *list);
+struct timer *timers_expire(struct timers *timers, struct timeabs expire);
*
* Returns the timers struct if it is consistent, NULL if not (it can
* never return NULL if @abortstr is set).
*
* Returns the timers struct if it is consistent, NULL if not (it can
* never return NULL if @abortstr is set).