Module Name: src
Committed By: riastradh
Date: Mon Aug 27 07:46:28 UTC 2018
Modified Files:
src/sys/external/bsd/common/include/linux: workqueue.h
src/sys/external/bsd/common/linux: linux_work.c
Log Message:
Add system_power_efficient_wq.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/sys/external/bsd/common/include/linux/workqueue.h
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/common/linux/linux_work.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/common/include/linux/workqueue.h
diff -u src/sys/external/bsd/common/include/linux/workqueue.h:1.7 src/sys/external/bsd/common/include/linux/workqueue.h:1.8
--- src/sys/external/bsd/common/include/linux/workqueue.h:1.7 Mon Aug 27 07:46:17 2018
+++ src/sys/external/bsd/common/include/linux/workqueue.h Mon Aug 27 07:46:28 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: workqueue.h,v 1.7 2018/08/27 07:46:17 riastradh Exp $ */
+/* $NetBSD: workqueue.h,v 1.8 2018/08/27 07:46:28 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -57,6 +57,7 @@
#define schedule_delayed_work linux_schedule_delayed_work
#define schedule_work linux_schedule_work
#define system_long_wq linux_system_long_wq
+#define system_power_efficient_wq linux_system_power_efficient_wq
#define system_wq linux_system_wq
#define to_delayed_work linux_to_delayed_work
@@ -92,6 +93,7 @@ to_delayed_work(struct work_struct *work
extern struct workqueue_struct *system_wq;
extern struct workqueue_struct *system_long_wq;
+extern struct workqueue_struct *system_power_efficient_wq;
int linux_workqueue_init(void);
void linux_workqueue_fini(void);
Index: src/sys/external/bsd/common/linux/linux_work.c
diff -u src/sys/external/bsd/common/linux/linux_work.c:1.5 src/sys/external/bsd/common/linux/linux_work.c:1.6
--- src/sys/external/bsd/common/linux/linux_work.c:1.5 Mon Aug 27 07:05:39 2018
+++ src/sys/external/bsd/common/linux/linux_work.c Mon Aug 27 07:46:28 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_work.c,v 1.5 2018/08/27 07:05:39 riastradh Exp $ */
+/* $NetBSD: linux_work.c,v 1.6 2018/08/27 07:46:28 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.5 2018/08/27 07:05:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.6 2018/08/27 07:46:28 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -94,6 +94,7 @@ static void linux_worker_intr(void *);
struct workqueue_struct *system_wq;
struct workqueue_struct *system_long_wq;
+struct workqueue_struct *system_power_efficient_wq;
static struct {
kmutex_t lock;
@@ -117,10 +118,15 @@ linux_workqueue_init(void)
if (system_long_wq == NULL)
goto fail1;
+ system_power_efficient_wq = alloc_ordered_workqueue("lnxpwrwq", 0);
+ if (system_long_wq == NULL)
+ goto fail2;
+
return 0;
-fail2: __unused
- destroy_workqueue(system_long_wq);
+fail3: __unused
+ destroy_workqueue(system_power_efficient_wq);
+fail2: destroy_workqueue(system_long_wq);
fail1: destroy_workqueue(system_wq);
fail0: mutex_destroy(&workqueues.lock);
return ENOMEM;