Lines Matching refs:t
783 static void __tasklet_schedule_common(struct tasklet_struct *t, in __tasklet_schedule_common() argument
792 t->next = NULL; in __tasklet_schedule_common()
793 *head->tail = t; in __tasklet_schedule_common()
794 head->tail = &(t->next); in __tasklet_schedule_common()
799 void __tasklet_schedule(struct tasklet_struct *t) in __tasklet_schedule() argument
801 __tasklet_schedule_common(t, &tasklet_vec, in __tasklet_schedule()
806 void __tasklet_hi_schedule(struct tasklet_struct *t) in __tasklet_hi_schedule() argument
808 __tasklet_schedule_common(t, &tasklet_hi_vec, in __tasklet_hi_schedule()
813 static bool tasklet_clear_sched(struct tasklet_struct *t) in tasklet_clear_sched() argument
815 if (test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) { in tasklet_clear_sched()
816 wake_up_var(&t->state); in tasklet_clear_sched()
821 t->use_callback ? "callback" : "func", in tasklet_clear_sched()
822 t->use_callback ? (void *)t->callback : (void *)t->func); in tasklet_clear_sched()
840 struct tasklet_struct *t = list; in tasklet_action_common() local
844 if (tasklet_trylock(t)) { in tasklet_action_common()
845 if (!atomic_read(&t->count)) { in tasklet_action_common()
846 if (tasklet_clear_sched(t)) { in tasklet_action_common()
847 if (t->use_callback) { in tasklet_action_common()
848 trace_tasklet_entry(t->callback); in tasklet_action_common()
849 t->callback(t); in tasklet_action_common()
850 trace_tasklet_exit(t->callback); in tasklet_action_common()
852 trace_tasklet_entry(t->func); in tasklet_action_common()
853 t->func(t->data); in tasklet_action_common()
854 trace_tasklet_exit(t->func); in tasklet_action_common()
857 tasklet_unlock(t); in tasklet_action_common()
860 tasklet_unlock(t); in tasklet_action_common()
864 t->next = NULL; in tasklet_action_common()
865 *tl_head->tail = t; in tasklet_action_common()
866 tl_head->tail = &t->next; in tasklet_action_common()
882 void tasklet_setup(struct tasklet_struct *t, in tasklet_setup() argument
885 t->next = NULL; in tasklet_setup()
886 t->state = 0; in tasklet_setup()
887 atomic_set(&t->count, 0); in tasklet_setup()
888 t->callback = callback; in tasklet_setup()
889 t->use_callback = true; in tasklet_setup()
890 t->data = 0; in tasklet_setup()
894 void tasklet_init(struct tasklet_struct *t, in tasklet_init() argument
897 t->next = NULL; in tasklet_init()
898 t->state = 0; in tasklet_init()
899 atomic_set(&t->count, 0); in tasklet_init()
900 t->func = func; in tasklet_init()
901 t->use_callback = false; in tasklet_init()
902 t->data = data; in tasklet_init()
911 void tasklet_unlock_spin_wait(struct tasklet_struct *t) in tasklet_unlock_spin_wait() argument
913 while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { in tasklet_unlock_spin_wait()
932 void tasklet_kill(struct tasklet_struct *t) in tasklet_kill() argument
937 while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) in tasklet_kill()
938 wait_var_event(&t->state, !test_bit(TASKLET_STATE_SCHED, &t->state)); in tasklet_kill()
940 tasklet_unlock_wait(t); in tasklet_kill()
941 tasklet_clear_sched(t); in tasklet_kill()
946 void tasklet_unlock(struct tasklet_struct *t) in tasklet_unlock() argument
949 clear_bit(TASKLET_STATE_RUN, &t->state); in tasklet_unlock()
951 wake_up_var(&t->state); in tasklet_unlock()
955 void tasklet_unlock_wait(struct tasklet_struct *t) in tasklet_unlock_wait() argument
957 wait_var_event(&t->state, !test_bit(TASKLET_STATE_RUN, &t->state)); in tasklet_unlock_wait()