svn commit: r275610 - in stable/10: share/man/man9 sys/sys
Andriy Gapon
avg at FreeBSD.org
Mon Dec 8 13:13:19 UTC 2014
Author: avg
Date: Mon Dec 8 13:13:17 2014
New Revision: 275610
URL: https://svnweb.freebsd.org/changeset/base/275610
Log:
MFC r275045: callout(9): add sbt flavors of callout_schedule
Not applicable to earlier releases.
Modified:
stable/10/share/man/man9/Makefile
stable/10/share/man/man9/timeout.9
stable/10/sys/sys/callout.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/share/man/man9/Makefile
==============================================================================
--- stable/10/share/man/man9/Makefile Mon Dec 8 13:06:44 2014 (r275609)
+++ stable/10/share/man/man9/Makefile Mon Dec 8 13:13:17 2014 (r275610)
@@ -1385,10 +1385,14 @@ MLINKS+=timeout.9 callout.9 \
timeout.9 callout_init_rw.9 \
timeout.9 callout_pending.9 \
timeout.9 callout_reset.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_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 crcopy.9 \
Modified: stable/10/share/man/man9/timeout.9
==============================================================================
--- stable/10/share/man/man9/timeout.9 Mon Dec 8 13:06:44 2014 (r275609)
+++ stable/10/share/man/man9/timeout.9 Mon Dec 8 13:13:17 2014 (r275610)
@@ -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: stable/10/sys/sys/callout.h
==============================================================================
--- stable/10/sys/sys/callout.h Mon Dec 8 13:06:44 2014 (r275609)
+++ stable/10/sys/sys/callout.h Mon Dec 8 13:13:17 2014 (r275610)
@@ -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) \
More information about the svn-src-all
mailing list