Lines Matching refs:tsk_ctl
703 #define PROC_START(thread_func, owner, tsk_ctl, flags, name) \ argument
705 sema_init(&((tsk_ctl)->sema), 0); \
706 init_completion(&((tsk_ctl)->completed)); \
707 init_completion(&((tsk_ctl)->flushed)); \
708 (tsk_ctl)->parent = owner; \
709 (tsk_ctl)->proc_name = name; \
710 (tsk_ctl)->terminated = FALSE; \
711 (tsk_ctl)->flush_ind = FALSE; \
712 (tsk_ctl)->up_cnt = 0; \
713 (tsk_ctl)->p_task = kthread_run(thread_func, tsk_ctl, (char*)name); \
714 if (IS_ERR((tsk_ctl)->p_task)) { \
715 (tsk_ctl)->thr_pid = -1; \
717 (tsk_ctl)->proc_name)); \
719 (tsk_ctl)->thr_pid = (tsk_ctl)->p_task->pid; \
720 spin_lock_init(&((tsk_ctl)->spinlock)); \
722 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
728 #define PROC_STOP(tsk_ctl) \ argument
731 (tsk_ctl)->terminated = TRUE; \
733 up(&((tsk_ctl)->sema)); \
735 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
736 timeout = (uint)wait_for_completion_timeout(&((tsk_ctl)->completed), timeout); \
739 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
742 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
743 (tsk_ctl)->parent = NULL; \
744 (tsk_ctl)->proc_name = NULL; \
745 (tsk_ctl)->thr_pid = -1; \
746 (tsk_ctl)->up_cnt = 0; \
749 #define PROC_STOP_USING_BINARY_SEMA(tsk_ctl) \ argument
752 (tsk_ctl)->terminated = TRUE; \
754 binary_sema_up(tsk_ctl); \
756 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
757 timeout = (uint)wait_for_completion_timeout(&((tsk_ctl)->completed), timeout); \
760 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
763 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
764 (tsk_ctl)->parent = NULL; \
765 (tsk_ctl)->proc_name = NULL; \
766 (tsk_ctl)->thr_pid = -1; \
775 #define PROC_FLUSH_USING_BINARY_SEMA(tsk_ctl) \ argument
778 (tsk_ctl)->flush_ind = TRUE; \
780 binary_sema_up(tsk_ctl); \
782 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
783 timeout = (uint)wait_for_completion_timeout(&((tsk_ctl)->flushed), timeout); \
786 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
789 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \