From 88176891b7980aefa1bfae2c637e13461f1217c7 Mon Sep 17 00:00:00 2001 From: ad Date: Sat, 14 Dec 2019 15:36:08 +0000 Subject: Use MPSAFE callouts. --- sys/modules/examples/executor/executor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/modules/examples/executor/executor.c') diff --git a/sys/modules/examples/executor/executor.c b/sys/modules/examples/executor/executor.c index 395bacaf321..3f121372e91 100644 --- a/sys/modules/examples/executor/executor.c +++ b/sys/modules/examples/executor/executor.c @@ -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 -__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 #include @@ -93,12 +93,12 @@ executor_modcmd(modcmd_t cmd, void *arg) 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: -- cgit