summaryrefslogtreecommitdiffstats
path: root/sys/ofed/include/linux/workqueue.h
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2013-09-29 00:35:03 +0000
committeralfred <alfred@FreeBSD.org>2013-09-29 00:35:03 +0000
commit91eb2b78a7e56a727c14039b1a0e05969398f2b5 (patch)
tree2c8631892ad121ada16a812ddbfd631e44299298 /sys/ofed/include/linux/workqueue.h
parent7e9b42c4d312afe32b30e8c1e60ccd6a47158fe3 (diff)
downloadFreeBSD-src-91eb2b78a7e56a727c14039b1a0e05969398f2b5.zip
FreeBSD-src-91eb2b78a7e56a727c14039b1a0e05969398f2b5.tar.gz
Update OFED to Linux 3.7 and update Mellanox drivers.
Update the OFED Infiniband core to the version supplied in Linux version 3.7. The update to OFED is nearly all additional defines and functions with the exception of the addition of additional parameters to ib_register_device() and the reg_user_mr callback. In addition the ibcore (Infiniband core) and ipoib (IP over Infiniband) have both been made into completely loadable modules to facilitate testing of the OFED stack in FreeBSD. Finally the Mellanox Infiniband drivers are now updated to the latest version shipping with Linux 3.7. Submitted by: Mellanox FreeBSD driver team: Oded Shanoon (odeds mellanox.com), Meny Yossefi (menyy mellanox.com), Orit Moskovich (oritm mellanox.com) Approved by: re
Diffstat (limited to 'sys/ofed/include/linux/workqueue.h')
-rw-r--r--sys/ofed/include/linux/workqueue.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/ofed/include/linux/workqueue.h b/sys/ofed/include/linux/workqueue.h
index ce5759b..b895bd3 100644
--- a/sys/ofed/include/linux/workqueue.h
+++ b/sys/ofed/include/linux/workqueue.h
@@ -80,7 +80,7 @@ do { \
callout_init(&(_work)->timer, CALLOUT_MPSAFE); \
} while (0)
-#define INIT_DELAYED_WORK_DEFERRABLE INIT_DELAYED_WORK
+#define INIT_DEFERRABLE_WORK INIT_DELAYED_WORK
#define schedule_work(work) \
do { \
@@ -121,6 +121,14 @@ queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work,
return (!pending);
}
+static inline bool schedule_delayed_work(struct delayed_work *dwork,
+ unsigned long delay)
+{
+ struct workqueue_struct wq;
+ wq.taskqueue = taskqueue_thread;
+ return queue_delayed_work(&wq, dwork, delay);
+}
+
static inline struct workqueue_struct *
_create_workqueue_common(char *name, int cpus)
{
@@ -190,4 +198,15 @@ cancel_delayed_work(struct delayed_work *work)
return 0;
}
+static inline int
+cancel_delayed_work_sync(struct delayed_work *work)
+{
+
+ callout_drain(&work->timer);
+ if (work->work.taskqueue &&
+ taskqueue_cancel(work->work.taskqueue, &work->work.work_task, NULL))
+ taskqueue_drain(work->work.taskqueue, &work->work.work_task);
+ return 0;
+}
+
#endif /* _LINUX_WORKQUEUE_H_ */
OpenPOWER on IntegriCloud