direct-io.hg

changeset 2278:1419a54e36ca

bitkeeper revision 1.1159.1.78 (41238a80nRCeFQAmbGc_sFDGt7oOhw)

Fix task queues.
author kaf24@scramble.cl.cam.ac.uk
date Wed Aug 18 16:57:36 2004 +0000 (2004-08-18)
parents 3addc3532bc7
children 730cb3f03609 c7ad1834d668
files linux-2.4.26-xen-sparse/include/asm-xen/queues.h linux-2.6.7-xen-sparse/drivers/xen/console/console.c linux-2.6.7-xen-sparse/include/asm-xen/queues.h
line diff
     1.1 --- a/linux-2.4.26-xen-sparse/include/asm-xen/queues.h	Wed Aug 18 15:45:19 2004 +0000
     1.2 +++ b/linux-2.4.26-xen-sparse/include/asm-xen/queues.h	Wed Aug 18 16:57:36 2004 +0000
     1.3 @@ -21,8 +21,10 @@
     1.4  #include <linux/list.h>
     1.5  #include <linux/tqueue.h>
     1.6  
     1.7 -#define DECLARE_WORK(_name, _fn, _arg) \
     1.8 -    struct tq_struct _name = { .routine = _fn, .data = _arg }
     1.9 +#define DECLARE_TQUEUE(_name, _fn, _arg) \
    1.10 +    struct tq_struct _name = { LIST_HEAD_INIT((_name).list), 0, _fn, _arg }
    1.11 +
    1.12 +#define DECLARE_WORK(_name, _fn, _arg) DECLARE_TQUEUE(_name, _fn, _arg)
    1.13  #define schedule_work(_w) schedule_task(_w)
    1.14  
    1.15  #endif /* __QUEUES_H__ */
     2.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/console/console.c	Wed Aug 18 15:45:19 2004 +0000
     2.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/console/console.c	Wed Aug 18 16:57:36 2004 +0000
     2.3 @@ -74,7 +74,9 @@ static void __xencons_tx_flush(void);
     2.4  /* This task is used to defer sending console data until there is space. */
     2.5  static void xencons_tx_flush_task_routine(void *data);
     2.6  
     2.7 -static struct tq_struct xencons_tx_flush_task;
     2.8 +static DECLARE_TQUEUE(xencons_tx_flush_task, 
     2.9 +                      xencons_tx_flush_task_routine,
    2.10 +                      NULL);
    2.11  
    2.12  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    2.13  static struct tty_driver *xencons_driver;
    2.14 @@ -631,8 +633,6 @@ static int __init xencons_init(void)
    2.15      if ( xc_mode == XC_OFF )
    2.16          return 0;
    2.17  
    2.18 -    INIT_TQUEUE(&xencons_tx_flush_task, xencons_tx_flush_task_routine, NULL);
    2.19 -
    2.20  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    2.21      xencons_driver = alloc_tty_driver((xc_mode == XC_SERIAL) ? 
    2.22                                        1 : MAX_NR_CONSOLES);
     3.1 --- a/linux-2.6.7-xen-sparse/include/asm-xen/queues.h	Wed Aug 18 15:45:19 2004 +0000
     3.2 +++ b/linux-2.6.7-xen-sparse/include/asm-xen/queues.h	Wed Aug 18 16:57:36 2004 +0000
     3.3 @@ -32,6 +32,9 @@ struct tq_struct {
     3.4          (_name)->pending = 0;                       \
     3.5          INIT_WORK(&(_name)->work, (_fn), (_arg));   \
     3.6      } while ( 0 )
     3.7 +#define DECLARE_TQUEUE(_name, _fn, _arg)                                    \
     3.8 +    struct tq_struct _name = { __WORK_INITIALIZER((_name).work, _fn, _arg), \
     3.9 +                               LIST_HEAD_INIT((_name).list), 0 }
    3.10  
    3.11  typedef struct {
    3.12      struct list_head list;