lkml.org 
[lkml]   [2001]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: tasklets and finalization
Date
On Monday 12 November 2001 8:57 am, you wrote:
> On 11-Nov-2001 Duncan Sands wrote:
> > PS: My first thought was to use tasklet_kill, but according
> > to "Linux device drivers" (2nd ed) that may hang if the
> > tasklet isn't pending.
>
> true.
>
> > PPS: Another thought was to call schedule(), hoping that
> > all pending asklets will get run then, but is that reliable?
>
> if you are sure, the tasklet isn't rescheduled within the tasklet
> i THINK this will do it:
>
> current->policy |= SCHED_YIELD;
> schedule();
>
> me

Thanks for thinking about this. Here's a thought:

...
tasklet_schedule(&my_tasklet);
tasklet_kill(&my_tasklet);
...

Since (as far as I can see) there is no way the
tasklet will run before calling tasklet_kill, this
should just kill any pending tasklets.

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

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