Lines Matching refs:t
718 static void __tasklet_schedule_common(struct tasklet_struct *t, in __tasklet_schedule_common() argument
727 t->next = NULL; in __tasklet_schedule_common()
728 *head->tail = t; in __tasklet_schedule_common()
729 head->tail = &(t->next); in __tasklet_schedule_common()
734 void __tasklet_schedule(struct tasklet_struct *t) in __tasklet_schedule() argument
736 __tasklet_schedule_common(t, &tasklet_vec, in __tasklet_schedule()
741 void __tasklet_hi_schedule(struct tasklet_struct *t) in __tasklet_hi_schedule() argument
743 __tasklet_schedule_common(t, &tasklet_hi_vec, in __tasklet_hi_schedule()
748 static bool tasklet_clear_sched(struct tasklet_struct *t) in tasklet_clear_sched() argument
750 if (test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) { in tasklet_clear_sched()
751 wake_up_var(&t->state); in tasklet_clear_sched()
756 t->use_callback ? "callback" : "func", in tasklet_clear_sched()
757 t->use_callback ? (void *)t->callback : (void *)t->func); in tasklet_clear_sched()
775 struct tasklet_struct *t = list; in tasklet_action_common() local
779 if (tasklet_trylock(t)) { in tasklet_action_common()
780 if (!atomic_read(&t->count)) { in tasklet_action_common()
781 if (tasklet_clear_sched(t)) { in tasklet_action_common()
782 if (t->use_callback) { in tasklet_action_common()
783 trace_tasklet_entry(t, t->callback); in tasklet_action_common()
784 t->callback(t); in tasklet_action_common()
785 trace_tasklet_exit(t, t->callback); in tasklet_action_common()
787 trace_tasklet_entry(t, t->func); in tasklet_action_common()
788 t->func(t->data); in tasklet_action_common()
789 trace_tasklet_exit(t, t->func); in tasklet_action_common()
792 tasklet_unlock(t); in tasklet_action_common()
795 tasklet_unlock(t); in tasklet_action_common()
799 t->next = NULL; in tasklet_action_common()
800 *tl_head->tail = t; in tasklet_action_common()
801 tl_head->tail = &t->next; in tasklet_action_common()
817 void tasklet_setup(struct tasklet_struct *t, in tasklet_setup() argument
820 t->next = NULL; in tasklet_setup()
821 t->state = 0; in tasklet_setup()
822 atomic_set(&t->count, 0); in tasklet_setup()
823 t->callback = callback; in tasklet_setup()
824 t->use_callback = true; in tasklet_setup()
825 t->data = 0; in tasklet_setup()
829 void tasklet_init(struct tasklet_struct *t, in tasklet_init() argument
832 t->next = NULL; in tasklet_init()
833 t->state = 0; in tasklet_init()
834 atomic_set(&t->count, 0); in tasklet_init()
835 t->func = func; in tasklet_init()
836 t->use_callback = false; in tasklet_init()
837 t->data = data; in tasklet_init()
846 void tasklet_unlock_spin_wait(struct tasklet_struct *t) in tasklet_unlock_spin_wait() argument
848 while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { in tasklet_unlock_spin_wait()
867 void tasklet_kill(struct tasklet_struct *t) in tasklet_kill() argument
872 while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) in tasklet_kill()
873 wait_var_event(&t->state, !test_bit(TASKLET_STATE_SCHED, &t->state)); in tasklet_kill()
875 tasklet_unlock_wait(t); in tasklet_kill()
876 tasklet_clear_sched(t); in tasklet_kill()
881 void tasklet_unlock(struct tasklet_struct *t) in tasklet_unlock() argument
884 clear_bit(TASKLET_STATE_RUN, &t->state); in tasklet_unlock()
886 wake_up_var(&t->state); in tasklet_unlock()
890 void tasklet_unlock_wait(struct tasklet_struct *t) in tasklet_unlock_wait() argument
892 wait_var_event(&t->state, !test_bit(TASKLET_STATE_RUN, &t->state)); in tasklet_unlock_wait()