tasklets and finalization
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · you
Quoted 3 lines · 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.
Quoted 2 lines
PPS: Another thought was to call
schedule(), hoping that all pending asklets will get run then, but is that reliable?
Quoted 7 lines
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.
Quoted 8 lines · On 12-Nov-2001 Duncan Sands wrote:
...
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.
cpu#1 cpu#2tasklet_schedule
tasklet_schedule
run tasklet
tasklet_kill
loop
Signature · 1 line
me
Quoted 10 lines · Mathijs Mohlmann
Quoted 8 lines · On 12-Nov-2001 Duncan Sands wrote:
...
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.
Quoted 6 lines
cpu#1 cpu#2
tasklet_schedule
tasklet_schedule
run tasklet
tasklet_kill
loop
Aaargh! I should think before typing. It is too
early in the morning here...
Duncan.