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 New system_unbound_wq.



details:   https://anonhg.NetBSD.org/src/rev/87d5dce0d934
branches:  trunk
changeset: 1027817:87d5dce0d934
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 00:49:00 2021 +0000

description:
New system_unbound_wq.

diffstat:

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

diffs (63 lines):

diff -r 5cbda06da6fb -r 87d5dce0d934 sys/external/bsd/common/include/linux/workqueue.h
--- a/sys/external/bsd/common/include/linux/workqueue.h Sun Dec 19 00:48:53 2021 +0000
+++ b/sys/external/bsd/common/include/linux/workqueue.h Sun Dec 19 00:49:00 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: workqueue.h,v 1.13 2018/08/27 15:06:02 riastradh Exp $ */
+/*     $NetBSD: workqueue.h,v 1.14 2021/12/19 00:49:00 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013, 2018 The NetBSD Foundation, Inc.
@@ -90,6 +90,7 @@
 extern struct workqueue_struct *system_wq;
 extern struct workqueue_struct *system_long_wq;
 extern struct workqueue_struct *system_power_efficient_wq;
+extern struct workqueue_struct *system_unbound_wq;
 
 int    linux_workqueue_init(void);
 void   linux_workqueue_fini(void);
diff -r 5cbda06da6fb -r 87d5dce0d934 sys/external/bsd/common/linux/linux_work.c
--- a/sys/external/bsd/common/linux/linux_work.c        Sun Dec 19 00:48:53 2021 +0000
+++ b/sys/external/bsd/common/linux/linux_work.c        Sun Dec 19 00:49:00 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_work.c,v 1.46 2021/12/19 00:48:53 riastradh Exp $        */
+/*     $NetBSD: linux_work.c,v 1.47 2021/12/19 00:49:00 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.46 2021/12/19 00:48:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.47 2021/12/19 00:49:00 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -119,6 +119,7 @@
 struct workqueue_struct        *system_wq __read_mostly;
 struct workqueue_struct        *system_long_wq __read_mostly;
 struct workqueue_struct        *system_power_efficient_wq __read_mostly;
+struct workqueue_struct        *system_unbound_wq __read_mostly;
 
 static inline uintptr_t
 atomic_cas_uintptr(volatile uintptr_t *p, uintptr_t old, uintptr_t new)
@@ -160,10 +161,17 @@
                goto fail3;
        }
 
+       system_unbound_wq = alloc_ordered_workqueue("lnxubdwq", 0);
+       if (system_unbound_wq == NULL) {
+               error = ENOMEM;
+               goto fail4;
+       }
+
        return 0;
 
-fail4: __unused
-       destroy_workqueue(system_power_efficient_wq);
+fail5: __unused
+       destroy_workqueue(system_unbound_wq);
+fail4: destroy_workqueue(system_power_efficient_wq);
 fail3: destroy_workqueue(system_long_wq);
 fail2: destroy_workqueue(system_wq);
 fail1: lwp_specific_key_delete(workqueue_key);



Home | Main Index | Thread Index | Old Index