public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: andrewm@uow.edu.au, linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: flush_scheduled_tasks() question
Date: Mon, 29 Jan 2001 09:53:56 +0000	[thread overview]
Message-ID: <30086.980762036@redhat.com> (raw)
In-Reply-To: <3A744820.2C4C94F6@colorfullife.com>
In-Reply-To: <3A744820.2C4C94F6@colorfullife.com>


manfred@colorfullife.com said:
> Is is intentional that tummy_task is not initialized? 

It _is_ initialised. To zero :)

> Ok, it won't crash because the current __run_task_queue()
> implementation doesn't call tq->routine if it's NULL, but IMHO it's
> ugly.

-static struct tq_struct dummy_task;
+static struct tq_struct dummy_task /* = all zero */;


manfred@colorfullife.com said:
>  Additionally I don't like the loop in flush_scheduled_tasks(), what
> about replacing it with a locked semaphore (same idea as vfork)?

The reason for doing it that way was because there was no guarantee that 
scheduled tasks will be called in order. So you can't just stick a new task 
in the queue and assume that when it's completed the queue is flushed. 

Linus then changed that and made the eventd thread call tasks in order, but 
I believe the intention is still that we don't make that guarantee, so it 
may change at any point in the future. 

--
dwmw2


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

  reply	other threads:[~2001-01-29  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-28 16:26 flush_scheduled_tasks() question Manfred Spraul
2001-01-29  9:53 ` David Woodhouse [this message]
2001-01-29 10:15   ` Manfred Spraul

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=30086.980762036@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=andrewm@uow.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=torvalds@transmeta.com \
    /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