Module: xenomai-jki
Branch: for-upstream
Commit: bc3fefdc8dccc5e77f48f708537d48ff01734a83
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=bc3fefdc8dccc5e77f48f708537d48ff01734a83

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Mon Apr 19 19:00:38 2010 +0200

Move schedule_delayed_work into wrapping header

The DENX linuxppc_2_4_devel contains an incomplete workqueue.h wrapper,
forcing us to define schedule_delayed_work outside of our own, then
unsused version.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-generic/wrappers.h   |   13 +++++++++++++
 include/compat/linux/workqueue.h |   13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 7513781..ecc1867 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -194,6 +194,19 @@ do {                                                       
                \
 #define DECLARE_WORK_FUNC(f)           void f(void *cookie)
 #define DECLARE_DELAYED_WORK_NODATA(n, f) DECLARE_WORK(n, f, NULL)
 
+/*
+ * WARNING: This is not identical to 2.6 schedule_delayed_work as it delayes
+ * the caller to schedule the task after the specified delay. That's fine for
+ * our current use cases, though.
+ */
+#define schedule_delayed_work(work, delay) do {                        \
+       if (delay) {                                            \
+               set_current_state(TASK_UNINTERRUPTIBLE);        \
+               schedule_timeout(delay);                        \
+       }                                                       \
+       schedule_task(work);                                    \
+} while (0)
+
 /* Msleep is unknown before 2.4.28 */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28)
 #define msleep(x) do {                          \
diff --git a/include/compat/linux/workqueue.h b/include/compat/linux/workqueue.h
index 6fad03c..3ac37aa 100644
--- a/include/compat/linux/workqueue.h
+++ b/include/compat/linux/workqueue.h
@@ -28,17 +28,4 @@
 #define schedule_work(x)         schedule_task(x)
 #define flush_scheduled_work()   flush_scheduled_tasks()
 
-/*
- * WARNING: This is not identical to 2.6 schedule_delayed_work as it delayes
- * the caller to schedule the task after the specified delay. That's fine for
- * our current use cases, though.
- */
-#define schedule_delayed_work(work, delay) do {                        \
-       if (delay) {                                            \
-               set_current_state(TASK_UNINTERRUPTIBLE);        \
-               schedule_timeout(delay);                        \
-       }                                                       \
-       schedule_task(work);                                    \
-} while (0)
-
 #endif /* _XENO_COMPAT_LINUX_WORKQUEUE_H */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to