LinuxKPI: Let del_timer return a value to match Linux.
This patch is part of https://reviews.freebsd.org/D19565. Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week
This commit is contained in:
parent
711d44ee56
commit
02927c768a
@ -81,8 +81,8 @@ extern unsigned long linux_timer_hz_mask;
|
||||
extern void mod_timer(struct timer_list *, int);
|
||||
extern void add_timer(struct timer_list *);
|
||||
extern void add_timer_on(struct timer_list *, int cpu);
|
||||
extern int del_timer(struct timer_list *);
|
||||
|
||||
#define del_timer(timer) (void)callout_stop(&(timer)->callout)
|
||||
#define del_timer_sync(timer) (void)callout_drain(&(timer)->callout)
|
||||
#define timer_pending(timer) callout_pending(&(timer)->callout)
|
||||
#define round_jiffies(j) \
|
||||
|
@ -1906,6 +1906,15 @@ add_timer_on(struct timer_list *timer, int cpu)
|
||||
&linux_timer_callback_wrapper, timer, cpu);
|
||||
}
|
||||
|
||||
int
|
||||
del_timer(struct timer_list *timer)
|
||||
{
|
||||
|
||||
if (callout_stop(&(timer)->callout) == -1)
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
linux_timer_init(void *arg)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user