public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Drokin <green@namesys.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net, jdike@karaya.com
Subject: Re: [patch] Workqueue Abstraction, 2.5.40-H7
Date: Wed, 2 Oct 2002 12:22:39 +0400	[thread overview]
Message-ID: <20021002122239.A25514@namesys.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0210011653370.28821-102000@localhost.localdomain>

Hello!

On Tue, Oct 01, 2002 at 06:24:50PM +0200, Ingo Molnar wrote:

> The pach converts roughly 80% of all tqueue-using code to workqueues - and
> all the places that are not converted to workqueues yet are places that do
> not compile in vanilla 2.5.40 anyway, due to unrelated changes. I've
> converted a fair number of drivers that do not compile in 2.5.40, and i
> think i've managed to convert every driver that compiles under 2.5.40.

Here are corresponding changes to UML code (that were not done by Ingo just
because this code cannot be compiled due to Makefile bug).

This patch is required to make UML compilable again in bk-current (after you
fix the Makefile, of course).
I tested the patch and UML works fine for me.

Bye,
    Oleg

===== arch/um/drivers/chan_kern.c 1.2 vs edited =====
--- 1.2/arch/um/drivers/chan_kern.c	Mon Sep 30 11:59:19 2002
+++ edited/arch/um/drivers/chan_kern.c	Wed Oct  2 12:08:57 2002
@@ -395,7 +395,7 @@
 	return(-1);
 }
 
-void chan_interrupt(struct list_head *chans, struct tq_struct *task,
+void chan_interrupt(struct list_head *chans, struct work_struct *task,
 		    struct tty_struct *tty, int irq, void *dev)
 {
 	struct list_head *ele, *next;
@@ -409,7 +409,7 @@
 		do {
 			if((tty != NULL) && 
 			   (tty->flip.count >= TTY_FLIPBUF_SIZE)){
-				schedule_task(task);
+				schedule_work(task);
 				goto out;
 			}
 			err = chan->ops->read(chan->fd, &c, chan->data);
===== arch/um/drivers/line.c 1.1 vs edited =====
--- 1.1/arch/um/drivers/line.c	Fri Sep  6 21:29:28 2002
+++ edited/arch/um/drivers/line.c	Wed Oct  2 12:02:14 2002
@@ -215,7 +215,7 @@
 			if(err) goto out;
 		}
 		enable_chan(&line->chan_list, line);
-		INIT_TQUEUE(&line->task, line_timer_cb, line);
+		INIT_WORK(&line->task, line_timer_cb, line);
 	}
 
 	if(!line->sigio){
===== arch/um/drivers/mconsole_kern.c 1.1 vs edited =====
--- 1.1/arch/um/drivers/mconsole_kern.c	Fri Sep  6 21:29:28 2002
+++ edited/arch/um/drivers/mconsole_kern.c	Wed Oct  2 12:06:54 2002
@@ -13,7 +13,7 @@
 #include "linux/ctype.h"
 #include "linux/interrupt.h"
 #include "linux/sysrq.h"
-#include "linux/tqueue.h"
+#include "linux/workqueue.h"
 #include "linux/module.h"
 #include "linux/proc_fs.h"
 #include "asm/irq.h"
@@ -42,7 +42,7 @@
 
 LIST_HEAD(mc_requests);
 
-void mc_task_proc(void *unused)
+void mc_work_proc(void *unused)
 {
 	struct mconsole_entry *req;
 	unsigned long flags;
@@ -60,10 +60,7 @@
 	} while(!done);
 }
 
-struct tq_struct mconsole_task = {
-	routine:	mc_task_proc,
-	data: 		NULL
-};
+DECLARE_WORK(mconsole_work, mc_work_proc, NULL);
 
 void mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
@@ -84,7 +81,7 @@
 			}
 		}
 	}
-	if(!list_empty(&mc_requests)) schedule_task(&mconsole_task);
+	if(!list_empty(&mc_requests)) schedule_work(&mconsole_work);
 	reactivate_fd(fd, MCONSOLE_IRQ);
 }
 
===== arch/um/include/chan_kern.h 1.1 vs edited =====
--- 1.1/arch/um/include/chan_kern.h	Fri Sep  6 21:29:28 2002
+++ edited/arch/um/include/chan_kern.h	Wed Oct  2 12:07:57 2002
@@ -22,7 +22,7 @@
 	void *data;
 };
 
-extern void chan_interrupt(struct list_head *chans, struct tq_struct *task,
+extern void chan_interrupt(struct list_head *chans, struct work_struct *task,
 			   struct tty_struct *tty, int irq, void *dev);
 extern int parse_chan_pair(char *str, struct list_head *chans, int pri, 
 			   int device, struct chan_opts *opts);
===== arch/um/include/line.h 1.1 vs edited =====
--- 1.1/arch/um/include/line.h	Fri Sep  6 21:29:28 2002
+++ edited/arch/um/include/line.h	Wed Oct  2 12:01:27 2002
@@ -7,7 +7,7 @@
 #define __LINE_H__
 
 #include "linux/list.h"
-#include "linux/tqueue.h"
+#include "linux/workqueue.h"
 #include "linux/tty.h"
 #include "asm/semaphore.h"
 #include "chan_user.h"
@@ -39,7 +39,7 @@
 	char *head;
 	char *tail;
 	int sigio;
-	struct tq_struct task;
+	struct work_struct task;
 	struct line_driver *driver;
 	int have_irq;
 };

  parent reply	other threads:[~2002-10-02  8:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-01 16:24 [patch] Workqueue Abstraction, 2.5.40-H7 Ingo Molnar
2002-10-01 17:55 ` Kai Germaschewski
2002-10-01 21:27   ` Ingo Molnar
2002-10-01 18:04 ` Jeff Garzik
2002-10-01 18:52   ` Ingo Molnar
2002-10-01 21:06     ` Jeff Garzik
2002-10-01 21:30       ` Ingo Molnar
2002-10-01 19:16 ` Linus Torvalds
2002-10-01 19:53   ` Linus Torvalds
2002-10-01 21:32 ` Kristian Hogsberg
2002-10-03 18:44   ` Ingo Molnar
2002-10-04 23:20     ` Kristian Hogsberg
2002-10-02  4:22 ` Christoph Hellwig
2002-10-01 21:31   ` Ingo Molnar
2002-10-02  8:22 ` Oleg Drokin [this message]
2002-10-08  3:50   ` Jeff Dike
  -- strict thread matches above, loose matches on Subject: below --
2002-10-01 18:52 Marc-Christian Petersen
2002-10-02  3:58 ` Christoph Hellwig
2002-10-01 20:29 Ingo Molnar
2002-10-01 20:49 ` Linus Torvalds
2002-10-01 21:21   ` Ingo Molnar
2002-10-02  3:23     ` Miles Bader
2002-10-02 19:18     ` Randy.Dunlap
2002-10-01 21:09 ` Jes Sorensen
2002-10-01 21:35   ` Ingo Molnar
2002-10-03  1:38 ` Kevin O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021002122239.A25514@namesys.com \
    --to=green@namesys.com \
    --cc=jdike@karaya.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox