Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/common Add system_long_wq.
details: https://anonhg.NetBSD.org/src/rev/427f9f7db01c
branches: trunk
changeset: 834916:427f9f7db01c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 06:55:23 2018 +0000
description:
Add system_long_wq.
diffstat:
sys/external/bsd/common/include/linux/workqueue.h | 3 ++-
sys/external/bsd/common/linux/linux_work.c | 20 +++++++++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
diffs (72 lines):
diff -r 20cf3dd3427a -r 427f9f7db01c sys/external/bsd/common/include/linux/workqueue.h
--- a/sys/external/bsd/common/include/linux/workqueue.h Mon Aug 27 06:55:13 2018 +0000
+++ b/sys/external/bsd/common/include/linux/workqueue.h Mon Aug 27 06:55:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: workqueue.h,v 1.2 2018/08/27 06:54:40 riastradh Exp $ */
+/* $NetBSD: workqueue.h,v 1.3 2018/08/27 06:55:23 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -88,6 +88,7 @@
}
extern struct workqueue_struct *system_wq;
+extern struct workqueue_struct *system_long_wq;
int linux_workqueue_init(void);
void linux_workqueue_fini(void);
diff -r 20cf3dd3427a -r 427f9f7db01c sys/external/bsd/common/linux/linux_work.c
--- a/sys/external/bsd/common/linux/linux_work.c Mon Aug 27 06:55:13 2018 +0000
+++ b/sys/external/bsd/common/linux/linux_work.c Mon Aug 27 06:55:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_work.c,v 1.1 2016/02/24 22:04:15 skrll Exp $ */
+/* $NetBSD: linux_work.c,v 1.2 2018/08/27 06:55:23 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.1 2016/02/24 22:04:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.2 2018/08/27 06:55:23 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -90,21 +90,35 @@
static void linux_worker_intr(void *);
struct workqueue_struct *system_wq;
+struct workqueue_struct *system_long_wq;
int
linux_workqueue_init(void)
{
+ int error;
system_wq = alloc_ordered_workqueue("lnxsyswq", 0);
if (system_wq == NULL)
- return ENOMEM;
+ goto fail0;
+
+ system_long_wq = alloc_ordered_workqueue("lnxlngwq", 0);
+ if (system_long_wq == NULL)
+ goto fail1;
return 0;
+
+fail2: __unused
+ destroy_workqueue(system_long_wq);
+fail1: destroy_workqueue(system_wq);
+fail0: return ENOMEM;
}
void
linux_workqueue_fini(void)
{
+
+ destroy_workqueue(system_long_wq);
+ system_long_wq = NULL;
destroy_workqueue(system_wq);
system_wq = NULL;
}
Home |
Main Index |
Thread Index |
Old Index