Source-Changes-HG archive

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

[src/trunk]: src/sys/modules/examples/executor Use MPSAFE callouts.



details:   https://anonhg.NetBSD.org/src/rev/1e16bdb7e38a
branches:  trunk
changeset: 1005592:1e16bdb7e38a
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Dec 14 15:36:08 2019 +0000

description:
Use MPSAFE callouts.

diffstat:

 sys/modules/examples/executor/executor.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r d895a8d29f9c -r 1e16bdb7e38a sys/modules/examples/executor/executor.c
--- a/sys/modules/examples/executor/executor.c  Sat Dec 14 15:34:18 2019 +0000
+++ b/sys/modules/examples/executor/executor.c  Sat Dec 14 15:36:08 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: executor.c,v 1.1 2018/04/13 20:30:09 kamil Exp $       */
+/*     $NetBSD: executor.c,v 1.2 2019/12/14 15:36:08 ad Exp $  */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: executor.c,v 1.1 2018/04/13 20:30:09 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: executor.c,v 1.2 2019/12/14 15:36:08 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/module.h>
@@ -93,12 +93,12 @@
        switch(cmd) {
        case MODULE_CMD_INIT:
                printf("executor module inserted\n");
-               callout_init(&sc, 0);
+               callout_init(&sc, CALLOUT_MPSAFE);
                callout_reset(&sc, mstohz(1000), callout_example, NULL);
                break;
        case MODULE_CMD_FINI:
                printf("executor module unloaded\n");
-               callout_stop(&sc);
+               callout_halt(&sc, NULL);
                callout_destroy(&sc);
                break;
        default:



Home | Main Index | Thread Index | Old Index