Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

workqueue: Split out workqueue_types.h

More sched.h dependency culling - this lets us kill a rhashtable-types.h
dependency on workqueue.h.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

+29 -16
+1
include/linux/dma-fence.h
··· 21 21 #include <linux/sched.h> 22 22 #include <linux/printk.h> 23 23 #include <linux/rcupdate.h> 24 + #include <linux/timekeeping.h> 24 25 25 26 struct dma_fence; 26 27 struct dma_fence_ops;
+1 -1
include/linux/rhashtable-types.h
··· 12 12 #include <linux/atomic.h> 13 13 #include <linux/compiler.h> 14 14 #include <linux/mutex.h> 15 - #include <linux/workqueue.h> 15 + #include <linux/workqueue_types.h> 16 16 17 17 struct rhash_head { 18 18 struct rhash_head __rcu *next;
+1
include/linux/timekeeping.h
··· 4 4 5 5 #include <linux/errno.h> 6 6 #include <linux/clocksource_ids.h> 7 + #include <linux/ktime.h> 7 8 8 9 /* Included from linux/ktime.h */ 9 10
+1 -15
include/linux/workqueue.h
··· 14 14 #include <linux/atomic.h> 15 15 #include <linux/cpumask.h> 16 16 #include <linux/rcupdate.h> 17 - 18 - struct workqueue_struct; 19 - 20 - struct work_struct; 21 - typedef void (*work_func_t)(struct work_struct *work); 22 - void delayed_work_timer_fn(struct timer_list *t); 17 + #include <linux/workqueue_types.h> 23 18 24 19 /* 25 20 * The first word is the work queue pointer and the flags rolled into ··· 89 94 90 95 #define WORK_STRUCT_FLAG_MASK ((1ul << WORK_STRUCT_FLAG_BITS) - 1) 91 96 #define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) 92 - 93 - struct work_struct { 94 - atomic_long_t data; 95 - struct list_head entry; 96 - work_func_t func; 97 - #ifdef CONFIG_LOCKDEP 98 - struct lockdep_map lockdep_map; 99 - #endif 100 - }; 101 97 102 98 #define WORK_DATA_INIT() ATOMIC_LONG_INIT((unsigned long)WORK_STRUCT_NO_POOL) 103 99 #define WORK_DATA_STATIC_INIT() \
+25
include/linux/workqueue_types.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _LINUX_WORKQUEUE_TYPES_H 3 + #define _LINUX_WORKQUEUE_TYPES_H 4 + 5 + #include <linux/atomic.h> 6 + #include <linux/lockdep_types.h> 7 + #include <linux/timer_types.h> 8 + #include <linux/types.h> 9 + 10 + struct workqueue_struct; 11 + 12 + struct work_struct; 13 + typedef void (*work_func_t)(struct work_struct *work); 14 + void delayed_work_timer_fn(struct timer_list *t); 15 + 16 + struct work_struct { 17 + atomic_long_t data; 18 + struct list_head entry; 19 + work_func_t func; 20 + #ifdef CONFIG_LOCKDEP 21 + struct lockdep_map lockdep_map; 22 + #endif 23 + }; 24 + 25 + #endif /* _LINUX_WORKQUEUE_TYPES_H */