Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2017 14:56:57 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314774 - in head/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201703061456.v26EuvnE006529@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703061456.v26EuvnE006529>