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/linux Add system_power_efficient_wq.



details:   https://anonhg.NetBSD.org/src/rev/e7f198469bbf
branches:  trunk
changeset: 992779:e7f198469bbf
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:46:28 2018 +0000

description:
Add system_power_efficient_wq.

diffstat:

 sys/external/bsd/common/include/linux/workqueue.h |   4 +++-
 sys/external/bsd/common/linux/linux_work.c        |  14 ++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diffs (69 lines):

diff -r fc360b176da2 -r e7f198469bbf sys/external/bsd/common/include/linux/workqueue.h
--- a/sys/external/bsd/common/include/linux/workqueue.h Mon Aug 27 07:46:17 2018 +0000
+++ b/sys/external/bsd/common/include/linux/workqueue.h Mon Aug 27 07:46:28 2018 +0000
@@ -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 @@
 
 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);
diff -r fc360b176da2 -r e7f198469bbf sys/external/bsd/common/linux/linux_work.c
--- a/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 07:46:17 2018 +0000
+++ b/sys/external/bsd/common/linux/linux_work.c        Mon Aug 27 07:46:28 2018 +0000
@@ -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 @@
 
 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 @@
        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;



Home | Main Index | Thread Index | Old Index