From 8a9dc62606fc7947dca294afc1e74b3a571dea9c Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 30 Jan 2018 08:49:38 +0000 Subject: [PATCH] add create_singlethread_workqueue()/system_power_efficient_wq --- sys/dev/pci/drm/drm_linux.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h index 051684db92d..0984e125dfe 100644 --- a/sys/dev/pci/drm/drm_linux.h +++ b/sys/dev/pci/drm/drm_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.h,v 1.75 2018/01/30 08:46:49 jsg Exp $ */ +/* $OpenBSD: drm_linux.h,v 1.76 2018/01/30 08:49:38 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -703,6 +703,13 @@ alloc_ordered_workqueue(const char *name, int flags) return (struct workqueue_struct *)tq; } +static inline struct workqueue_struct * +create_singlethread_workqueue(const char *name) +{ + struct taskq *tq = taskq_create(name, 1, IPL_TTY, 0); + return (struct workqueue_struct *)tq; +} + static inline void destroy_workqueue(struct workqueue_struct *wq) { @@ -744,6 +751,8 @@ struct delayed_work { struct taskq *tq; }; +#define system_power_efficient_wq ((struct workqueue_struct *)systq) + static inline struct delayed_work * to_delayed_work(struct work_struct *work) { -- 2.20.1