From owner-svn-src-stable-10@FreeBSD.ORG Mon Dec 8 13:13:19 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D604C6AE; Mon, 8 Dec 2014 13:13:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1E15FD9; Mon, 8 Dec 2014 13:13:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB8DDIGx002221; Mon, 8 Dec 2014 13:13:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB8DDIWA002218; Mon, 8 Dec 2014 13:13:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201412081313.sB8DDIWA002218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 8 Dec 2014 13:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275610 - in stable/10: share/man/man9 sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2014 13:13:19 -0000 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) \