Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2014 15:21:21 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r275045 - in head: share/man/man9 sys/sys
Message-ID:  <201411251521.sAPFLL25016256@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue Nov 25 15:21:21 2014
New Revision: 275045
URL: https://svnweb.freebsd.org/changeset/base/275045

Log:
  callout(9): add sbt flavors of callout_schedule
  
  Differential Revision:	https://reviews.freebsd.org/D1161 (partial)
  Reviewed by:	jhb, markj
  MFC after:	1 week

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/timeout.9
  head/sys/sys/callout.h

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Tue Nov 25 15:09:34 2014	(r275044)
+++ head/share/man/man9/Makefile	Tue Nov 25 15:21:21 2014	(r275045)
@@ -1576,12 +1576,16 @@ MLINKS+=timeout.9 callout.9 \
 	timeout.9 callout_pending.9 \
 	timeout.9 callout_reset.9 \
 	timeout.9 callout_reset_curcpu.9 \
-	timeout.9 callout_reset_sbt.9 \
 	timeout.9 callout_reset_on.9 \
+	timeout.9 callout_reset_sbt.9 \
+	timeout.9 callout_reset_sbt_curcpu.9 \
 	timeout.9 callout_reset_sbt_on.9 \
 	timeout.9 callout_schedule.9 \
 	timeout.9 callout_schedule_curcpu.9 \
 	timeout.9 callout_schedule_on.9 \
+	timeout.9 callout_schedule_sbt.9 \
+	timeout.9 callout_schedule_sbt_curcpu.9 \
+	timeout.9 callout_schedule_sbt_on.9 \
 	timeout.9 callout_stop.9 \
 	timeout.9 untimeout.9
 MLINKS+=ucred.9 cred_update_thread.9 \

Modified: head/share/man/man9/timeout.9
==============================================================================
--- head/share/man/man9/timeout.9	Tue Nov 25 15:09:34 2014	(r275044)
+++ head/share/man/man9/timeout.9	Tue Nov 25 15:21:21 2014	(r275045)
@@ -51,6 +51,9 @@
 .Nm callout_schedule ,
 .Nm callout_schedule_curcpu ,
 .Nm callout_schedule_on ,
+.Nm callout_schedule_sbt ,
+.Nm callout_schedule_sbt_curcpu ,
+.Nm callout_schedule_sbt_on ,
 .Nm callout_stop ,
 .Nm timeout ,
 .Nm untimeout
@@ -106,6 +109,15 @@ struct callout_handle handle = CALLOUT_H
 .Ft int
 .Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu"
 .Ft int
+.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \
+"sbintime_t pr" "int flags"
+.Ft int
+.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \
+"sbintime_t pr" "int flags"
+.Ft int
+.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \
+"sbintime_t pr" "int cpu" "int flags"
+.Ft int
 .Fn callout_stop "struct callout *c"
 .Ft struct callout_handle
 .Fn timeout "timeout_t *func" "void *arg" "int ticks"
@@ -386,21 +398,24 @@ callouts are assigned to CPU 0.
 The
 .Fn callout_reset_on ,
 .Fn callout_reset_sbt_on ,
-and
 .Fn callout_schedule_on
+and
+.Fn callout_schedule_sbt_on
 functions assign the callout to CPU
 .Fa cpu .
 The
 .Fn callout_reset_curcpu ,
 .Fn callout_reset_sbt_curpu ,
-and
 .Fn callout_schedule_curcpu
+and
+.Fn callout_schedule_sbt_curcpu
 functions assign the callout to the current CPU.
 The
 .Fn callout_reset ,
 .Fn callout_reset_sbt ,
-and
 .Fn callout_schedule
+and
+.Fn callout_schedule_sbt
 functions schedule the callout to execute in the softclock thread of the CPU
 to which it is currently assigned.
 .Pp

Modified: head/sys/sys/callout.h
==============================================================================
--- head/sys/sys/callout.h	Tue Nov 25 15:09:34 2014	(r275044)
+++ head/sys/sys/callout.h	Tue Nov 25 15:21:21 2014	(r275045)
@@ -91,6 +91,13 @@ int	callout_reset_sbt_on(struct callout 
     callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu)
 #define	callout_reset_curcpu(c, on_tick, fn, arg)			\
     callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid))
+#define	callout_schedule_sbt_on(c, sbt, pr, cpu, flags)			\
+    callout_reset_sbt_on((c), (sbt), (pr), (c)->c_func, (c)->c_arg,	\
+        (cpu), (flags))
+#define	callout_schedule_sbt(c, sbt, pr, flags)				\
+    callout_schedule_sbt_on((c), (sbt), (pr), (c)->c_cpu, (flags))
+#define	callout_schedule_sbt_curcpu(c, sbt, pr, flags)			\
+    callout_schedule_sbt_on((c), (sbt), (pr), PCPU_GET(cpuid), (flags))
 int	callout_schedule(struct callout *, int);
 int	callout_schedule_on(struct callout *, int, int);
 #define	callout_schedule_curcpu(c, on_tick)				\



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