Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sysmon This really does need to return an error code...
details: https://anonhg.NetBSD.org/src/rev/4daa60975a98
branches: trunk
changeset: 337699:4daa60975a98
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Apr 24 00:31:04 2015 +0000
description:
This really does need to return an error code, so change the
sysmon_task_queue_fini() function to have a non-void type.
diffstat:
sys/dev/sysmon/sysmon_taskq.c | 13 +++++++------
sys/dev/sysmon/sysmon_taskq.h | 4 ++--
2 files changed, 9 insertions(+), 8 deletions(-)
diffs (70 lines):
diff -r bffd821118a8 -r 4daa60975a98 sys/dev/sysmon/sysmon_taskq.c
--- a/sys/dev/sysmon/sysmon_taskq.c Fri Apr 24 00:20:16 2015 +0000
+++ b/sys/dev/sysmon/sysmon_taskq.c Fri Apr 24 00:31:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_taskq.c,v 1.16 2015/04/24 00:04:47 agc Exp $ */
+/* $NetBSD: sysmon_taskq.c,v 1.17 2015/04/24 00:31:04 pgoyette Exp $ */
/*
* Copyright (c) 2001, 2003 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_taskq.c,v 1.16 2015/04/24 00:04:47 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_taskq.c,v 1.17 2015/04/24 00:31:04 pgoyette Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -134,12 +134,12 @@
*
* Tear town the sysmon task queue.
*/
-void
+int
sysmon_task_queue_fini(void)
{
if (sysmon_task_queue_initialized > 1)
- return;
+ return EBUSY;
mutex_enter(&sysmon_task_queue_mtx);
@@ -151,6 +151,8 @@
&sysmon_task_queue_mtx);
mutex_exit(&sysmon_task_queue_mtx);
+
+ return 0;
}
/*
@@ -250,8 +252,7 @@
break;
case MODULE_CMD_FINI:
- sysmon_task_queue_fini();
- ret = 0;
+ ret = sysmon_task_queue_fini();
break;
case MODULE_CMD_STAT:
diff -r bffd821118a8 -r 4daa60975a98 sys/dev/sysmon/sysmon_taskq.h
--- a/sys/dev/sysmon/sysmon_taskq.h Fri Apr 24 00:20:16 2015 +0000
+++ b/sys/dev/sysmon/sysmon_taskq.h Fri Apr 24 00:31:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_taskq.h,v 1.2 2007/07/21 23:15:17 xtraeme Exp $ */
+/* $NetBSD: sysmon_taskq.h,v 1.3 2015/04/24 00:31:04 pgoyette Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
void sysmon_task_queue_preinit(void);
void sysmon_task_queue_init(void);
-void sysmon_task_queue_fini(void);
+int sysmon_task_queue_fini(void);
int sysmon_task_queue_sched(u_int, void (*)(void *), void *);
#endif /* _DEV_SYSMON_SYSMON_TASKQ_H_ */
Home |
Main Index |
Thread Index |
Old Index