svn commit: r314774 - in head/sys/compat/linuxkpi/common: include/linux src
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Mar 6 14:56:58 UTC 2017
Author: hselasky
Date: Mon Mar 6 14:56:57 2017
New Revision: 314774
URL: https://svnweb.freebsd.org/changeset/base/314774
Log:
Implement add_timer_on() function in the LinuxKPI.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/linux/timer.h
head/sys/compat/linuxkpi/common/src/linux_compat.c
Modified: head/sys/compat/linuxkpi/common/include/linux/timer.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/timer.h Mon Mar 6 14:09:54 2017 (r314773)
+++ head/sys/compat/linuxkpi/common/include/linux/timer.h Mon Mar 6 14:56:57 2017 (r314774)
@@ -62,6 +62,7 @@ do { \
extern void mod_timer(struct timer_list *, unsigned long);
extern void add_timer(struct timer_list *);
+extern void add_timer_on(struct timer_list *, int cpu);
#define del_timer(timer) callout_stop(&(timer)->timer_callout)
#define del_timer_sync(timer) callout_drain(&(timer)->timer_callout)
Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Mar 6 14:09:54 2017 (r314773)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Mar 6 14:56:57 2017 (r314774)
@@ -1023,6 +1023,15 @@ add_timer(struct timer_list *timer)
&linux_timer_callback_wrapper, timer);
}
+void
+add_timer_on(struct timer_list *timer, int cpu)
+{
+
+ callout_reset_on(&timer->timer_callout,
+ linux_timer_jiffies_until(timer->expires),
+ &linux_timer_callback_wrapper, timer, cpu);
+}
+
static void
linux_timer_init(void *arg)
{
More information about the svn-src-head
mailing list