Lines Matching refs:tsk_ctl

650 #define PROC_START(thread_func, owner, tsk_ctl, flags, name) \  argument
652 sema_init(&((tsk_ctl)->sema), 0); \
653 init_completion(&((tsk_ctl)->completed)); \
654 init_completion(&((tsk_ctl)->flushed)); \
655 (tsk_ctl)->parent = owner; \
656 (tsk_ctl)->proc_name = name; \
657 (tsk_ctl)->terminated = FALSE; \
658 (tsk_ctl)->flush_ind = FALSE; \
659 (tsk_ctl)->up_cnt = 0; \
660 (tsk_ctl)->p_task = kthread_run(thread_func, tsk_ctl, (char*)name); \
661 if (IS_ERR((tsk_ctl)->p_task)) { \
662 (tsk_ctl)->thr_pid = -1; \
664 (tsk_ctl)->proc_name)); \
666 (tsk_ctl)->thr_pid = (tsk_ctl)->p_task->pid; \
667 spin_lock_init(&((tsk_ctl)->spinlock)); \
669 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
675 #define PROC_STOP(tsk_ctl) \ argument
678 (tsk_ctl)->terminated = TRUE; \
680 up(&((tsk_ctl)->sema)); \
682 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
683 timeout = (uint)wait_for_completion_timeout(&((tsk_ctl)->completed), timeout); \
686 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
689 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
690 (tsk_ctl)->parent = NULL; \
691 (tsk_ctl)->proc_name = NULL; \
692 (tsk_ctl)->thr_pid = -1; \
693 (tsk_ctl)->up_cnt = 0; \
696 #define PROC_STOP_USING_BINARY_SEMA(tsk_ctl) \ argument
699 (tsk_ctl)->terminated = TRUE; \
701 binary_sema_up(tsk_ctl); \
703 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
704 timeout = (uint)wait_for_completion_timeout(&((tsk_ctl)->completed), timeout); \
707 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
710 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
711 (tsk_ctl)->parent = NULL; \
712 (tsk_ctl)->proc_name = NULL; \
713 (tsk_ctl)->thr_pid = -1; \
722 #define PROC_FLUSH_USING_BINARY_SEMA(tsk_ctl) \ argument
725 (tsk_ctl)->flush_ind = TRUE; \
727 binary_sema_up(tsk_ctl); \
729 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
730 timeout = (uint)wait_for_completion_timeout(&((tsk_ctl)->flushed), timeout); \
733 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \
736 (tsk_ctl)->proc_name, (tsk_ctl)->thr_pid)); \