diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-10-19 10:49:15 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-10-19 10:49:15 +0000 |
commit | 5bb43cdb3135beef85654ab56a46c76f3879d641 (patch) | |
tree | 5059bde77926f0764ba43f609dec6564197d2d16 /sys/ofed | |
parent | f204be76de3ab32ce7e295d0767252f547d6075f (diff) | |
download | FreeBSD-src-5bb43cdb3135beef85654ab56a46c76f3879d641.zip FreeBSD-src-5bb43cdb3135beef85654ab56a46c76f3879d641.tar.gz |
Merge LinuxKPI changes from DragonflyBSD:
- Some minor whitespace fixes.
- Added support for two new Linux functions.
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/ofed')
-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 075016a..3f2c7fe 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) { |