summaryrefslogtreecommitdiff
path: root/libdde_linux26/lib/src/arch
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-06-30 23:56:26 -0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-06-30 23:56:26 -0300
commitc81310d41ab762e49315f37b0818272e8dce12a2 (patch)
tree85e0fc0f4e6067c741ede9972c584d51f93d5661 /libdde_linux26/lib/src/arch
parent4ee6908ccdbfbc860ef69dae37debd51cdf0d446 (diff)
Add tasklet_kill
* libdde_linux26/lib/src/arch/l4/softirq.c (tasklet_kill): New function.
Diffstat (limited to 'libdde_linux26/lib/src/arch')
-rw-r--r--libdde_linux26/lib/src/arch/l4/softirq.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libdde_linux26/lib/src/arch/l4/softirq.c b/libdde_linux26/lib/src/arch/l4/softirq.c
index 247a414f..d93bfaff 100644
--- a/libdde_linux26/lib/src/arch/l4/softirq.c
+++ b/libdde_linux26/lib/src/arch/l4/softirq.c
@@ -67,6 +67,20 @@ void tasklet_init(struct tasklet_struct *t,
t->data = data;
}
+void tasklet_kill(struct tasklet_struct *t)
+{
+ if (in_interrupt())
+ printk("Attempt to kill tasklet from interrupt\n");
+
+ while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) {
+ do
+ yield();
+ while (test_bit(TASKLET_STATE_SCHED, &t->state));
+ }
+ tasklet_unlock_wait(t);
+ clear_bit(TASKLET_STATE_SCHED, &t->state);
+}
+
/* enqueue tasklet */
static void __tasklet_enqueue(struct tasklet_struct *t,
struct tasklet_head *listhead)