Re: [PATCH] test12-pre8 task queue fix batch

2000-12-11 Thread Kai Germaschewski



On Sun, 10 Dec 2000, Mohammad A. Haque wrote:

> More fixes. Ignore previous.

diff -urw linux-2.4.0-test12.old/drivers/atm/ambassador.c 
linux-2.4.0-test12/drivers/atm/ambassador.c
--- linux-2.4.0-test12.old/drivers/atm/ambassador.c Fri Jul  7 00:37:24 2000
+++ linux-2.4.0-test12/drivers/atm/ambassador.c Sun Dec 10 19:44:09 2000
@@ -2397,7 +2397,7 @@
   
 #ifdef FILL_RX_POOLS_IN_BH
   // initialise bottom half
-  dev->bh.next = 0;
+  INIT_LIST_HEAD(>bh.list);
   dev->bh.sync = 0;
   dev->bh.routine = (void (*)(void *)) fill_rx_pools;
   dev->bh.data = dev;

> (and so on)



I don't think this is the right fix. First of all, if one needed to the
INIT_LIST_HEAD, some new macro should be introduced (INIT_TASK or
something), which takes care of the .list and .sync structures. So when
something was about to change again in the future, you wouldn't have to go
through all the files and fix them again.

But: The INIT_LIST_HEAD is unnecessary and misleading at least, because
tqueue->list is not a list head, it's there to allow for adding the struct
tqueue onto a task_queue. So we have the task_queue, that's the list head
- it needs to be initialized, and that's already done via
DECLARE_TASK_QUEUE. Then we have tasks to be added to the list (struct
tqueue), their .list members don't need to be initialized because they get
set when the task is queued on a task_queue (in queue_task).

So I think the correct fix is just to remove the offending lines.

--Kai


 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] test12-pre8 task queue fix batch

2000-12-11 Thread Kai Germaschewski



On Sun, 10 Dec 2000, Mohammad A. Haque wrote:

 More fixes. Ignore previous.

diff -urw linux-2.4.0-test12.old/drivers/atm/ambassador.c 
linux-2.4.0-test12/drivers/atm/ambassador.c
--- linux-2.4.0-test12.old/drivers/atm/ambassador.c Fri Jul  7 00:37:24 2000
+++ linux-2.4.0-test12/drivers/atm/ambassador.c Sun Dec 10 19:44:09 2000
@@ -2397,7 +2397,7 @@
   
 #ifdef FILL_RX_POOLS_IN_BH
   // initialise bottom half
-  dev-bh.next = 0;
+  INIT_LIST_HEAD(dev-bh.list);
   dev-bh.sync = 0;
   dev-bh.routine = (void (*)(void *)) fill_rx_pools;
   dev-bh.data = dev;

 (and so on)



I don't think this is the right fix. First of all, if one needed to the
INIT_LIST_HEAD, some new macro should be introduced (INIT_TASK or
something), which takes care of the .list and .sync structures. So when
something was about to change again in the future, you wouldn't have to go
through all the files and fix them again.

But: The INIT_LIST_HEAD is unnecessary and misleading at least, because
tqueue-list is not a list head, it's there to allow for adding the struct
tqueue onto a task_queue. So we have the task_queue, that's the list head
- it needs to be initialized, and that's already done via
DECLARE_TASK_QUEUE. Then we have tasks to be added to the list (struct
tqueue), their .list members don't need to be initialized because they get
set when the task is queued on a task_queue (in queue_task).

So I think the correct fix is just to remove the offending lines.

--Kai


 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] test12-pre8 task queue fix batch

2000-12-10 Thread Mohammad A. Haque

More fixes. Ignore previous.

"Mohammad A. Haque" wrote:
> 
> Lets see if this is the gist of them...

-- 

=
Mohammad A. Haque  http://www.haque.net/ 
   [EMAIL PROTECTED]

  "Alcohol and calculus don't mix. Project Lead
   Don't drink and derive." --Unknown  http://wm.themes.org/
   [EMAIL PROTECTED]
=

diff -urw linux-2.4.0-test12.old/drivers/atm/ambassador.c 
linux-2.4.0-test12/drivers/atm/ambassador.c
--- linux-2.4.0-test12.old/drivers/atm/ambassador.c Fri Jul  7 00:37:24 2000
+++ linux-2.4.0-test12/drivers/atm/ambassador.c Sun Dec 10 19:44:09 2000
@@ -2397,7 +2397,7 @@
   
 #ifdef FILL_RX_POOLS_IN_BH
   // initialise bottom half
-  dev->bh.next = 0;
+  INIT_LIST_HEAD(>bh.list);
   dev->bh.sync = 0;
   dev->bh.routine = (void (*)(void *)) fill_rx_pools;
   dev->bh.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c 
linux-2.4.0-test12/drivers/char/drm/gamma_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/gamma_dma.c Sun Dec 10 19:04:01 2000
@@ -651,7 +651,7 @@
dev->dma->next_queue  = NULL;
dev->dma->this_buffer = NULL;
 
-   dev->tq.next  = NULL;
+   INIT_LIST_HEAD(>tq.list);
dev->tq.sync  = 0;
dev->tq.routine   = gamma_dma_schedule_tq_wrapper;
dev->tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c 
linux-2.4.0-test12/drivers/char/drm/i810_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c  Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/i810_dma.c  Sun Dec 10 19:04:32 2000
@@ -924,7 +924,7 @@
dev->dma->next_queue  = NULL;
dev->dma->this_buffer = NULL;
 
-   dev->tq.next  = NULL;
+   INIT_LIST_HEAD(>tq.list);
dev->tq.sync  = 0;
dev->tq.routine   = i810_dma_task_queue;
dev->tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c 
linux-2.4.0-test12/drivers/char/drm/mga_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c   Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/char/drm/mga_dma.c   Sun Dec 10 19:05:43 2000
@@ -818,7 +818,7 @@
dev->dma->next_buffer = NULL;
dev->dma->next_queue  = NULL;
dev->dma->this_buffer = NULL;
-   dev->tq.next  = NULL;
+   INIT_LIST_HEAD(>tq.list);
dev->tq.sync  = 0;
dev->tq.routine   = mga_dma_task_queue;
dev->tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/n_r3964.c 
linux-2.4.0-test12/drivers/char/n_r3964.c
--- linux-2.4.0-test12.old/drivers/char/n_r3964.c   Fri Jul 21 22:51:56 2000
+++ linux-2.4.0-test12/drivers/char/n_r3964.c   Sun Dec 10 19:02:28 2000
@@ -1157,12 +1157,12 @@
 * Add 'on_timer' to timer task queue
 * (will be called from timer bh)
 */
-   pInfo->bh_1.next = NULL;
+   INIT_LIST_HEAD(>bh_1.list);
pInfo->bh_1.sync = 0;
pInfo->bh_1.routine = _timer_1;
pInfo->bh_1.data = pInfo;

-   pInfo->bh_2.next = NULL;
+   INIT_LIST_HEAD(>bh_2.list);
pInfo->bh_2.sync = 0;
pInfo->bh_2.routine = _timer_2;
pInfo->bh_2.data = pInfo;
diff -urw linux-2.4.0-test12.old/drivers/char/scan_keyb.c 
linux-2.4.0-test12/drivers/char/scan_keyb.c
--- linux-2.4.0-test12.old/drivers/char/scan_keyb.c Tue Oct  3 14:13:21 2000
+++ linux-2.4.0-test12/drivers/char/scan_keyb.c Sun Dec 10 19:06:20 2000
@@ -120,7 +120,7 @@
 void __init scan_kbd_init(void)
 {
 
-   task_scan_kbd.next=NULL;
+   INIT_LIST_HEAD(task_scan_kbd.list);
task_scan_kbd.sync=0;
task_scan_kbd.routine=scan_kbd;
task_scan_kbd.data=NULL;
diff -urw linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c 
linux-2.4.0-test12/drivers/i2o/i2o_lan.c
--- linux-2.4.0-test12.old/drivers/i2o/i2o_lan.cSun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/i2o/i2o_lan.cSun Dec 10 17:46:07 2000
@@ -112,8 +112,10 @@
 };
 static int lan_context;
 
-static struct tq_struct i2o_post_buckets_task = {
-   0, 0, (void (*)(void *))i2o_lan_receive_post, (void *) 0
+DECLARE_TASK_QUEUE(i2o_post_buckets_task);
+struct tq_struct run_i2o_post_buckets_task = {
+   routine: (void (*)(void *)) run_task_queue,
+   data: (void *) 0
 };
 
 /* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@
/* If DDM has already consumed bucket_thresh buckets, post new ones */
 
if (atomic_read(>buckets_out) <= priv->max_buckets_out - 
priv->bucket_thresh) {
-   i2o_post_buckets_task.data = (void *)dev;
-   queue_task(_post_buckets_task, _immediate);
+   

Re: [PATCH] test12-pre8 task queue fix batch

2000-12-10 Thread Ingo Oeser

On Sun, Dec 10, 2000 at 07:20:56PM -0500, Mohammad A. Haque wrote:
> Lets see if this is the gist of them...
 
At least one more to fix:

diff -ru linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c 
linux/drivers/isdn/hisax/config.c
--- linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c Sun Dec 10 20:38:55 2000+++ 
linux/drivers/isdn/hisax/config.c  Mon Dec 11 01:04:16 2000
@@ -1180,7 +1180,7 @@
cs->tx_skb = NULL;
cs->tx_cnt = 0;
cs->event = 0;
-   cs->tqueue.next = 0;
+   INIT_LIST_HEAD(>tqueue.list);
cs->tqueue.sync = 0;
cs->tqueue.data = cs;



Regards 

Ingo Oeser
-- 
10.+11.03.2001 - 3. Chemnitzer LinuxTag 
    come and join the fun   
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] test12-pre8 task queue fix batch

2000-12-10 Thread Mohammad A. Haque

Lets see if this is the gist of them...

-- 

=
Mohammad A. Haque  http://www.haque.net/ 
   [EMAIL PROTECTED]

  "Alcohol and calculus don't mix. Project Lead
   Don't drink and derive." --Unknown  http://wm.themes.org/
   [EMAIL PROTECTED]
=

diff -urw linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c 
linux-2.4.0-test12/drivers/char/drm/gamma_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/gamma_dma.c Sun Dec 10 19:04:01 2000
@@ -651,7 +651,7 @@
dev->dma->next_queue  = NULL;
dev->dma->this_buffer = NULL;
 
-   dev->tq.next  = NULL;
+   INIT_LIST_HEAD(>tq.list);
dev->tq.sync  = 0;
dev->tq.routine   = gamma_dma_schedule_tq_wrapper;
dev->tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c 
linux-2.4.0-test12/drivers/char/drm/i810_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c  Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/i810_dma.c  Sun Dec 10 19:04:32 2000
@@ -924,7 +924,7 @@
dev->dma->next_queue  = NULL;
dev->dma->this_buffer = NULL;
 
-   dev->tq.next  = NULL;
+   INIT_LIST_HEAD(>tq.list);
dev->tq.sync  = 0;
dev->tq.routine   = i810_dma_task_queue;
dev->tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c 
linux-2.4.0-test12/drivers/char/drm/mga_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c   Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/char/drm/mga_dma.c   Sun Dec 10 19:05:43 2000
@@ -818,7 +818,7 @@
dev->dma->next_buffer = NULL;
dev->dma->next_queue  = NULL;
dev->dma->this_buffer = NULL;
-   dev->tq.next  = NULL;
+   INIT_LIST_HEAD(>tq.list);
dev->tq.sync  = 0;
dev->tq.routine   = mga_dma_task_queue;
dev->tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/n_r3964.c 
linux-2.4.0-test12/drivers/char/n_r3964.c
--- linux-2.4.0-test12.old/drivers/char/n_r3964.c   Fri Jul 21 22:51:56 2000
+++ linux-2.4.0-test12/drivers/char/n_r3964.c   Sun Dec 10 19:02:28 2000
@@ -1157,12 +1157,12 @@
 * Add 'on_timer' to timer task queue
 * (will be called from timer bh)
 */
-   pInfo->bh_1.next = NULL;
+   INIT_LIST_HEAD(>bh_1.list);
pInfo->bh_1.sync = 0;
pInfo->bh_1.routine = _timer_1;
pInfo->bh_1.data = pInfo;

-   pInfo->bh_2.next = NULL;
+   INIT_LIST_HEAD(>bh_2.list);
pInfo->bh_2.sync = 0;
pInfo->bh_2.routine = _timer_2;
pInfo->bh_2.data = pInfo;
diff -urw linux-2.4.0-test12.old/drivers/char/scan_keyb.c 
linux-2.4.0-test12/drivers/char/scan_keyb.c
--- linux-2.4.0-test12.old/drivers/char/scan_keyb.c Tue Oct  3 14:13:21 2000
+++ linux-2.4.0-test12/drivers/char/scan_keyb.c Sun Dec 10 19:06:20 2000
@@ -120,7 +120,7 @@
 void __init scan_kbd_init(void)
 {
 
-   task_scan_kbd.next=NULL;
+   INIT_LIST_HEAD(task_scan_kbd.list);
task_scan_kbd.sync=0;
task_scan_kbd.routine=scan_kbd;
task_scan_kbd.data=NULL;
diff -urw linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c 
linux-2.4.0-test12/drivers/i2o/i2o_lan.c
--- linux-2.4.0-test12.old/drivers/i2o/i2o_lan.cSun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/i2o/i2o_lan.cSun Dec 10 17:46:07 2000
@@ -112,8 +112,10 @@
 };
 static int lan_context;
 
-static struct tq_struct i2o_post_buckets_task = {
-   0, 0, (void (*)(void *))i2o_lan_receive_post, (void *) 0
+DECLARE_TASK_QUEUE(i2o_post_buckets_task);
+struct tq_struct run_i2o_post_buckets_task = {
+   routine: (void (*)(void *)) run_task_queue,
+   data: (void *) 0
 };
 
 /* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@
/* If DDM has already consumed bucket_thresh buckets, post new ones */
 
if (atomic_read(>buckets_out) <= priv->max_buckets_out - 
priv->bucket_thresh) {
-   i2o_post_buckets_task.data = (void *)dev;
-   queue_task(_post_buckets_task, _immediate);
+   run_i2o_post_buckets_task.data = (void *)dev;
+   queue_task(_i2o_post_buckets_task, _immediate);
mark_bh(IMMEDIATE_BH);
}
 
@@ -1401,7 +1403,7 @@
atomic_set(>tx_out, 0);
priv->tx_count = 0;
 
-   priv->i2o_batch_send_task.next= NULL;
+   INIT_LIST_HEAD(>i2o_batch_send_task.list);
priv->i2o_batch_send_task.sync= 0;
priv->i2o_batch_send_task.routine = (void *)i2o_lan_batch_send;
priv->i2o_batch_send_task.data= (void *)dev;
diff -urw linux-2.4.0-test12.old/drivers/ieee1394/guid.c 

[PATCH] test12-pre8 task queue fix batch

2000-12-10 Thread Mohammad A. Haque

Lets see if this is the gist of them...

-- 

=
Mohammad A. Haque  http://www.haque.net/ 
   [EMAIL PROTECTED]

  "Alcohol and calculus don't mix. Project Lead
   Don't drink and derive." --Unknown  http://wm.themes.org/
   [EMAIL PROTECTED]
=

diff -urw linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c 
linux-2.4.0-test12/drivers/char/drm/gamma_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/gamma_dma.c Sun Dec 10 19:04:01 2000
@@ -651,7 +651,7 @@
dev-dma-next_queue  = NULL;
dev-dma-this_buffer = NULL;
 
-   dev-tq.next  = NULL;
+   INIT_LIST_HEAD(dev-tq.list);
dev-tq.sync  = 0;
dev-tq.routine   = gamma_dma_schedule_tq_wrapper;
dev-tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c 
linux-2.4.0-test12/drivers/char/drm/i810_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c  Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/i810_dma.c  Sun Dec 10 19:04:32 2000
@@ -924,7 +924,7 @@
dev-dma-next_queue  = NULL;
dev-dma-this_buffer = NULL;
 
-   dev-tq.next  = NULL;
+   INIT_LIST_HEAD(dev-tq.list);
dev-tq.sync  = 0;
dev-tq.routine   = i810_dma_task_queue;
dev-tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c 
linux-2.4.0-test12/drivers/char/drm/mga_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c   Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/char/drm/mga_dma.c   Sun Dec 10 19:05:43 2000
@@ -818,7 +818,7 @@
dev-dma-next_buffer = NULL;
dev-dma-next_queue  = NULL;
dev-dma-this_buffer = NULL;
-   dev-tq.next  = NULL;
+   INIT_LIST_HEAD(dev-tq.list);
dev-tq.sync  = 0;
dev-tq.routine   = mga_dma_task_queue;
dev-tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/n_r3964.c 
linux-2.4.0-test12/drivers/char/n_r3964.c
--- linux-2.4.0-test12.old/drivers/char/n_r3964.c   Fri Jul 21 22:51:56 2000
+++ linux-2.4.0-test12/drivers/char/n_r3964.c   Sun Dec 10 19:02:28 2000
@@ -1157,12 +1157,12 @@
 * Add 'on_timer' to timer task queue
 * (will be called from timer bh)
 */
-   pInfo-bh_1.next = NULL;
+   INIT_LIST_HEAD(pInfo-bh_1.list);
pInfo-bh_1.sync = 0;
pInfo-bh_1.routine = on_timer_1;
pInfo-bh_1.data = pInfo;

-   pInfo-bh_2.next = NULL;
+   INIT_LIST_HEAD(pInfo-bh_2.list);
pInfo-bh_2.sync = 0;
pInfo-bh_2.routine = on_timer_2;
pInfo-bh_2.data = pInfo;
diff -urw linux-2.4.0-test12.old/drivers/char/scan_keyb.c 
linux-2.4.0-test12/drivers/char/scan_keyb.c
--- linux-2.4.0-test12.old/drivers/char/scan_keyb.c Tue Oct  3 14:13:21 2000
+++ linux-2.4.0-test12/drivers/char/scan_keyb.c Sun Dec 10 19:06:20 2000
@@ -120,7 +120,7 @@
 void __init scan_kbd_init(void)
 {
 
-   task_scan_kbd.next=NULL;
+   INIT_LIST_HEAD(task_scan_kbd.list);
task_scan_kbd.sync=0;
task_scan_kbd.routine=scan_kbd;
task_scan_kbd.data=NULL;
diff -urw linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c 
linux-2.4.0-test12/drivers/i2o/i2o_lan.c
--- linux-2.4.0-test12.old/drivers/i2o/i2o_lan.cSun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/i2o/i2o_lan.cSun Dec 10 17:46:07 2000
@@ -112,8 +112,10 @@
 };
 static int lan_context;
 
-static struct tq_struct i2o_post_buckets_task = {
-   0, 0, (void (*)(void *))i2o_lan_receive_post, (void *) 0
+DECLARE_TASK_QUEUE(i2o_post_buckets_task);
+struct tq_struct run_i2o_post_buckets_task = {
+   routine: (void (*)(void *)) run_task_queue,
+   data: (void *) 0
 };
 
 /* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@
/* If DDM has already consumed bucket_thresh buckets, post new ones */
 
if (atomic_read(priv-buckets_out) = priv-max_buckets_out - 
priv-bucket_thresh) {
-   i2o_post_buckets_task.data = (void *)dev;
-   queue_task(i2o_post_buckets_task, tq_immediate);
+   run_i2o_post_buckets_task.data = (void *)dev;
+   queue_task(run_i2o_post_buckets_task, tq_immediate);
mark_bh(IMMEDIATE_BH);
}
 
@@ -1401,7 +1403,7 @@
atomic_set(priv-tx_out, 0);
priv-tx_count = 0;
 
-   priv-i2o_batch_send_task.next= NULL;
+   INIT_LIST_HEAD(priv-i2o_batch_send_task.list);
priv-i2o_batch_send_task.sync= 0;
priv-i2o_batch_send_task.routine = (void *)i2o_lan_batch_send;
priv-i2o_batch_send_task.data= (void *)dev;
diff -urw linux-2.4.0-test12.old/drivers/ieee1394/guid.c 

Re: [PATCH] test12-pre8 task queue fix batch

2000-12-10 Thread Ingo Oeser

On Sun, Dec 10, 2000 at 07:20:56PM -0500, Mohammad A. Haque wrote:
 Lets see if this is the gist of them...
 
At least one more to fix:

diff -ru linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c 
linux/drivers/isdn/hisax/config.c
--- linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c Sun Dec 10 20:38:55 2000+++ 
linux/drivers/isdn/hisax/config.c  Mon Dec 11 01:04:16 2000
@@ -1180,7 +1180,7 @@
cs-tx_skb = NULL;
cs-tx_cnt = 0;
cs-event = 0;
-   cs-tqueue.next = 0;
+   INIT_LIST_HEAD(cs-tqueue.list);
cs-tqueue.sync = 0;
cs-tqueue.data = cs;



Regards 

Ingo Oeser
-- 
10.+11.03.2001 - 3. Chemnitzer LinuxTag http://www.tu-chemnitz.de/linux/tag
come and join the fun   
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] test12-pre8 task queue fix batch

2000-12-10 Thread Mohammad A. Haque

More fixes. Ignore previous.

"Mohammad A. Haque" wrote:
 
 Lets see if this is the gist of them...

-- 

=
Mohammad A. Haque  http://www.haque.net/ 
   [EMAIL PROTECTED]

  "Alcohol and calculus don't mix. Project Lead
   Don't drink and derive." --Unknown  http://wm.themes.org/
   [EMAIL PROTECTED]
=

diff -urw linux-2.4.0-test12.old/drivers/atm/ambassador.c 
linux-2.4.0-test12/drivers/atm/ambassador.c
--- linux-2.4.0-test12.old/drivers/atm/ambassador.c Fri Jul  7 00:37:24 2000
+++ linux-2.4.0-test12/drivers/atm/ambassador.c Sun Dec 10 19:44:09 2000
@@ -2397,7 +2397,7 @@
   
 #ifdef FILL_RX_POOLS_IN_BH
   // initialise bottom half
-  dev-bh.next = 0;
+  INIT_LIST_HEAD(dev-bh.list);
   dev-bh.sync = 0;
   dev-bh.routine = (void (*)(void *)) fill_rx_pools;
   dev-bh.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c 
linux-2.4.0-test12/drivers/char/drm/gamma_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/gamma_dma.c Sun Dec 10 19:04:01 2000
@@ -651,7 +651,7 @@
dev-dma-next_queue  = NULL;
dev-dma-this_buffer = NULL;
 
-   dev-tq.next  = NULL;
+   INIT_LIST_HEAD(dev-tq.list);
dev-tq.sync  = 0;
dev-tq.routine   = gamma_dma_schedule_tq_wrapper;
dev-tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c 
linux-2.4.0-test12/drivers/char/drm/i810_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c  Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/i810_dma.c  Sun Dec 10 19:04:32 2000
@@ -924,7 +924,7 @@
dev-dma-next_queue  = NULL;
dev-dma-this_buffer = NULL;
 
-   dev-tq.next  = NULL;
+   INIT_LIST_HEAD(dev-tq.list);
dev-tq.sync  = 0;
dev-tq.routine   = i810_dma_task_queue;
dev-tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c 
linux-2.4.0-test12/drivers/char/drm/mga_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c   Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/char/drm/mga_dma.c   Sun Dec 10 19:05:43 2000
@@ -818,7 +818,7 @@
dev-dma-next_buffer = NULL;
dev-dma-next_queue  = NULL;
dev-dma-this_buffer = NULL;
-   dev-tq.next  = NULL;
+   INIT_LIST_HEAD(dev-tq.list);
dev-tq.sync  = 0;
dev-tq.routine   = mga_dma_task_queue;
dev-tq.data  = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/n_r3964.c 
linux-2.4.0-test12/drivers/char/n_r3964.c
--- linux-2.4.0-test12.old/drivers/char/n_r3964.c   Fri Jul 21 22:51:56 2000
+++ linux-2.4.0-test12/drivers/char/n_r3964.c   Sun Dec 10 19:02:28 2000
@@ -1157,12 +1157,12 @@
 * Add 'on_timer' to timer task queue
 * (will be called from timer bh)
 */
-   pInfo-bh_1.next = NULL;
+   INIT_LIST_HEAD(pInfo-bh_1.list);
pInfo-bh_1.sync = 0;
pInfo-bh_1.routine = on_timer_1;
pInfo-bh_1.data = pInfo;

-   pInfo-bh_2.next = NULL;
+   INIT_LIST_HEAD(pInfo-bh_2.list);
pInfo-bh_2.sync = 0;
pInfo-bh_2.routine = on_timer_2;
pInfo-bh_2.data = pInfo;
diff -urw linux-2.4.0-test12.old/drivers/char/scan_keyb.c 
linux-2.4.0-test12/drivers/char/scan_keyb.c
--- linux-2.4.0-test12.old/drivers/char/scan_keyb.c Tue Oct  3 14:13:21 2000
+++ linux-2.4.0-test12/drivers/char/scan_keyb.c Sun Dec 10 19:06:20 2000
@@ -120,7 +120,7 @@
 void __init scan_kbd_init(void)
 {
 
-   task_scan_kbd.next=NULL;
+   INIT_LIST_HEAD(task_scan_kbd.list);
task_scan_kbd.sync=0;
task_scan_kbd.routine=scan_kbd;
task_scan_kbd.data=NULL;
diff -urw linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c 
linux-2.4.0-test12/drivers/i2o/i2o_lan.c
--- linux-2.4.0-test12.old/drivers/i2o/i2o_lan.cSun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/i2o/i2o_lan.cSun Dec 10 17:46:07 2000
@@ -112,8 +112,10 @@
 };
 static int lan_context;
 
-static struct tq_struct i2o_post_buckets_task = {
-   0, 0, (void (*)(void *))i2o_lan_receive_post, (void *) 0
+DECLARE_TASK_QUEUE(i2o_post_buckets_task);
+struct tq_struct run_i2o_post_buckets_task = {
+   routine: (void (*)(void *)) run_task_queue,
+   data: (void *) 0
 };
 
 /* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@
/* If DDM has already consumed bucket_thresh buckets, post new ones */
 
if (atomic_read(priv-buckets_out) = priv-max_buckets_out - 
priv-bucket_thresh) {
-   i2o_post_buckets_task.data = (void *)dev;
-   queue_task(i2o_post_buckets_task, tq_immediate);
+