[lkml]   [2001]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjecttasklets in 2.4.6

I have little question about tasklets in the kernel 2.4.6:

In kernel/softirq.c, line 178:

if (test_bit(TASKLET_STATE_SCHED, &t->state))

What's the idea behind this line? If the tasklet is already scheduled,
schedule it again? This does not make much sense to me.

Also, few lines before:

if (test_bit(TASKLET_STATE_SCHED, &t->state))
goto repeat;

Here we'll loop forever if the tasklet should schedule itself.

So if the tasklet schedules itself we'll loop it forever, and if it doesn't
it'll get never run again.
If we'd change the line 178 to:

if (!test_bit(TASKLET_STATE_SCHED, &t->state))

the tasklet would get scheduled if it was NOT scheduled, and everything would
go on happily forever :)

But anyway, I'm probably missing something here, perhaps someone could educate
me a bit ;-)

| tel: +358-40-8480344
| So Linus, what are we doing tonight?
| The same thing we every night Tux. Try to take over the world!
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:56    [W:0.092 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site