Pull up following revision(s) (requested by riastradh in ticket #96):

sys/external/bsd/drm2/include/linux/timer.h: revision 1.5
Add Linux timer_pending and del_timer.
This commit is contained in:
snj 2014-09-21 17:48:40 +00:00
parent 1b34b2b771
commit 0c90d360da
1 changed files with 15 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: timer.h,v 1.4 2014/07/16 20:56:25 riastradh Exp $ */
/* $NetBSD: timer.h,v 1.4.2.1 2014/09/21 17:48:40 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@ -82,6 +82,13 @@ mod_timer_pinned(struct timer_list *timer, unsigned long then)
mod_timer(timer, then);
}
static inline void
del_timer(struct timer_list *timer)
{
callout_stop(&timer->tl_callout);
}
static inline void
del_timer_sync(struct timer_list *timer)
{
@ -89,6 +96,13 @@ del_timer_sync(struct timer_list *timer)
callout_halt(&timer->tl_callout, NULL);
}
static inline bool
timer_pending(struct timer_list *timer)
{
return callout_pending(&timer->tl_callout);
}
/*
* XXX This is bogus -- the Linux version does various machinations to
* give some jitter so that stuff doesn't wake up all at once.