aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-08-18 16:57:36 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-08-18 16:57:36 +0000
commitafe0649d91472f3b2595034776987ac96e251975 (patch)
treee4551d1f9826dc7f7477e1fb9d83c2a27e7e54a2
parent10e86bfd12c52ba7de869a8429ad60975e5c2621 (diff)
downloadxen-afe0649d91472f3b2595034776987ac96e251975.tar.gz
xen-afe0649d91472f3b2595034776987ac96e251975.tar.bz2
xen-afe0649d91472f3b2595034776987ac96e251975.zip
bitkeeper revision 1.1159.1.78 (41238a80nRCeFQAmbGc_sFDGt7oOhw)
Fix task queues.
-rw-r--r--linux-2.4.26-xen-sparse/include/asm-xen/queues.h6
-rw-r--r--linux-2.6.7-xen-sparse/drivers/xen/console/console.c6
-rw-r--r--linux-2.6.7-xen-sparse/include/asm-xen/queues.h3
3 files changed, 10 insertions, 5 deletions
diff --git a/linux-2.4.26-xen-sparse/include/asm-xen/queues.h b/linux-2.4.26-xen-sparse/include/asm-xen/queues.h
index 64a4cbee85..38dfa48bba 100644
--- a/linux-2.4.26-xen-sparse/include/asm-xen/queues.h
+++ b/linux-2.4.26-xen-sparse/include/asm-xen/queues.h
@@ -21,8 +21,10 @@
#include <linux/list.h>
#include <linux/tqueue.h>
-#define DECLARE_WORK(_name, _fn, _arg) \
- struct tq_struct _name = { .routine = _fn, .data = _arg }
+#define DECLARE_TQUEUE(_name, _fn, _arg) \
+ struct tq_struct _name = { LIST_HEAD_INIT((_name).list), 0, _fn, _arg }
+
+#define DECLARE_WORK(_name, _fn, _arg) DECLARE_TQUEUE(_name, _fn, _arg)
#define schedule_work(_w) schedule_task(_w)
#endif /* __QUEUES_H__ */
diff --git a/linux-2.6.7-xen-sparse/drivers/xen/console/console.c b/linux-2.6.7-xen-sparse/drivers/xen/console/console.c
index 7942b12b60..c7c3d76e69 100644
--- a/linux-2.6.7-xen-sparse/drivers/xen/console/console.c
+++ b/linux-2.6.7-xen-sparse/drivers/xen/console/console.c
@@ -74,7 +74,9 @@ static void __xencons_tx_flush(void);
/* This task is used to defer sending console data until there is space. */
static void xencons_tx_flush_task_routine(void *data);
-static struct tq_struct xencons_tx_flush_task;
+static DECLARE_TQUEUE(xencons_tx_flush_task,
+ xencons_tx_flush_task_routine,
+ NULL);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
static struct tty_driver *xencons_driver;
@@ -631,8 +633,6 @@ static int __init xencons_init(void)
if ( xc_mode == XC_OFF )
return 0;
- INIT_TQUEUE(&xencons_tx_flush_task, xencons_tx_flush_task_routine, NULL);
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
xencons_driver = alloc_tty_driver((xc_mode == XC_SERIAL) ?
1 : MAX_NR_CONSOLES);
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/queues.h b/linux-2.6.7-xen-sparse/include/asm-xen/queues.h
index f2a66a71bf..6324092bd4 100644
--- a/linux-2.6.7-xen-sparse/include/asm-xen/queues.h
+++ b/linux-2.6.7-xen-sparse/include/asm-xen/queues.h
@@ -32,6 +32,9 @@ struct tq_struct {
(_name)->pending = 0; \
INIT_WORK(&(_name)->work, (_fn), (_arg)); \
} while ( 0 )
+#define DECLARE_TQUEUE(_name, _fn, _arg) \
+ struct tq_struct _name = { __WORK_INITIALIZER((_name).work, _fn, _arg), \
+ LIST_HEAD_INIT((_name).list), 0 }
typedef struct {
struct list_head list;