diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2015-10-19 10:49:15 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2015-10-19 10:49:15 +0000 |
| commit | 7c50bc1cf62dcfc0af91fa3918dfc962b1eec192 (patch) | |
| tree | 5059bde77926f0764ba43f609dec6564197d2d16 /sys/ofed/include/linux | |
| parent | 6b513e285346baa45c672ef1eab13b33d56e0453 (diff) | |
Notes
Diffstat (limited to 'sys/ofed/include/linux')
| -rw-r--r-- | sys/ofed/include/linux/workqueue.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/ofed/include/linux/workqueue.h b/sys/ofed/include/linux/workqueue.h index 075016ad5a35..3f2c7fe55693 100644 --- a/sys/ofed/include/linux/workqueue.h +++ b/sys/ofed/include/linux/workqueue.h @@ -91,11 +91,11 @@ do { \ #define flush_scheduled_work() flush_taskqueue(taskqueue_thread) -static inline int queue_work (struct workqueue_struct *q, struct work_struct *work) +static inline int queue_work(struct workqueue_struct *q, struct work_struct *work) { (work)->taskqueue = (q)->taskqueue; /* Return opposite val to align with Linux logic */ - return !taskqueue_enqueue((q)->taskqueue, &(work)->work_task); + return !taskqueue_enqueue((q)->taskqueue, &(work)->work_task); } static inline void @@ -151,6 +151,12 @@ _create_workqueue_common(char *name, int cpus) #define create_workqueue(name) \ _create_workqueue_common(name, MAXCPU) +#define alloc_ordered_workqueue(name, flags) \ + _create_workqueue_common(name, 1) + +#define alloc_workqueue(name, flags, max_active) \ + _create_workqueue_common(name, max_active) + static inline void destroy_workqueue(struct workqueue_struct *wq) { |
