Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Use callout_setfunc()/callout_schedule() instead...



details:   https://anonhg.NetBSD.org/src/rev/3c22d8fbdd48
branches:  trunk
changeset: 791420:3c22d8fbdd48
user:      bad <bad%NetBSD.org@localhost>
date:      Sun Nov 17 16:54:02 2013 +0000

description:
Use callout_setfunc()/callout_schedule() instead of callout_reset(), it is cheaper.

diffstat:

 sys/dev/pci/ubsec.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 92b58d96f59d -r 3c22d8fbdd48 sys/dev/pci/ubsec.c
--- a/sys/dev/pci/ubsec.c       Sun Nov 17 16:11:35 2013 +0000
+++ b/sys/dev/pci/ubsec.c       Sun Nov 17 16:54:02 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ubsec.c,v 1.29 2013/06/13 00:55:01 tls Exp $   */
+/*     $NetBSD: ubsec.c,v 1.30 2013/11/17 16:54:02 bad Exp $   */
 /* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.6 2003/01/23 21:06:43 sam Exp $ */
 /*     $OpenBSD: ubsec.c,v 1.127 2003/06/04 14:04:58 jason Exp $       */
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.29 2013/06/13 00:55:01 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.30 2013/11/17 16:54:02 bad Exp $");
 
 #undef UBSEC_DEBUG
 
@@ -448,7 +448,8 @@
                timeout_add(&sc->sc_rngto, sc->sc_rnghz);
 #else
                callout_init(&sc->sc_rngto, 0);
-               callout_reset(&sc->sc_rngto, sc->sc_rnghz, ubsec_rng, sc);
+               callout_setfunc(&sc->sc_rngto, ubsec_rng, sc);
+               callout_schedule(&sc->sc_rngto, sc->sc_rnghz);
 #endif
  skip_rng:
                if (sc->sc_rnghz)
@@ -1659,8 +1660,7 @@
                timeout_add(&sc->sc_rngto, sc->sc_rnghz);
 #else
                if (sc->sc_rng_need > 0) {
-                       callout_reset(&sc->sc_rngto, sc->sc_rnghz,
-                                     ubsec_rng, sc);
+                       callout_schedule(&sc->sc_rngto, sc->sc_rnghz);
                }
 #endif
                break;
@@ -1828,7 +1828,7 @@
 #ifdef __OpenBSD__
        timeout_add(&sc->sc_rngto, sc->sc_rnghz);
 #else
-       callout_reset(&sc->sc_rngto, sc->sc_rnghz, ubsec_rng, sc);
+       callout_schedule(&sc->sc_rngto, sc->sc_rnghz);
 #endif
 }
 #endif /* UBSEC_NO_RNG */



Home | Main Index | Thread Index | Old Index