aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-03-09 18:37:17 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-03-09 18:37:17 +0000
commitf73286645f487e3ddd876858b867281f47b9f46e (patch)
tree6c2bbac2baae7ba79f8cfb6fac6added22e2dbba
parent9760ac0a3eb6279b8807438ec81ccfe04a16ebfe (diff)
Notes
-rw-r--r--sys/compat/linuxkpi/common/include/linux/workqueue.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/workqueue.h b/sys/compat/linuxkpi/common/include/linux/workqueue.h
index d2fa90b53441..6fab4845311f 100644
--- a/sys/compat/linuxkpi/common/include/linux/workqueue.h
+++ b/sys/compat/linuxkpi/common/include/linux/workqueue.h
@@ -72,8 +72,13 @@ struct work_struct {
atomic_t state;
};
-#define DECLARE_WORK(name, fn) \
- struct work_struct name = { .func = (fn) }
+#define DECLARE_WORK(name, fn) \
+ struct work_struct name; \
+ static void name##_init(void *arg) \
+ { \
+ INIT_WORK(&name, fn); \
+ } \
+ SYSINIT(name, SI_SUB_LOCK, SI_ORDER_SECOND, name##_init, NULL)
struct delayed_work {
struct work_struct work;