15 #define DEFAULT_MIN_TIMEOUT ( TICKS_PER_SEC / 4 ) 18 #define DEFAULT_MAX_TIMEOUT ( 10 * TICKS_PER_SEC ) 82 #define TIMER_INIT( expired_fn ) { \ 83 .expired = (expired_fn), \ 111 return (
timer->running );
static void start_timer_nodelay(struct retry_timer *timer)
Start timer with no delay.
struct list_head list
List of active timers.
static unsigned long unsigned long max
void(* expired)(struct retry_timer *timer, int over)
Timer expired callback.
unsigned long start
Start time (in ticks)
A doubly-linked list entry (or list head)
struct refcnt * refcnt
Reference counter.
void retry_poll(void)
Poll the retry timer list.
static void(*) struct refcnt refcnt)
static __attribute__((always_inline)) void timer_init(struct retry_timer *timer
Initialise a timer.
void stop_timer(struct retry_timer *timer)
Stop timer.
static void(* expired)(struct retry_timer *timer, int over)
unsigned int count
Retry count.
unsigned long max
Maximum timeout value (in ticks), or zero to use default.
static struct timer * timer
Current timer.
unsigned long min
Minimum timeout value (in ticks), or zero to use default.
void start_timer(struct retry_timer *timer)
Start timer.
void start_timer_fixed(struct retry_timer *timer, unsigned long timeout)
Start timer with a specified timeout.
unsigned int running
Timer is currently running.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned long timeout
Timeout value (in ticks)