Lines Matching refs:task_ref
64 int get_vas_user_win_ref(struct vas_user_win_ref *task_ref) in get_vas_user_win_ref() argument
74 task_ref->pid = get_task_pid(current, PIDTYPE_PID); in get_vas_user_win_ref()
78 task_ref->mm = get_task_mm(current); in get_vas_user_win_ref()
79 if (!task_ref->mm) { in get_vas_user_win_ref()
80 put_pid(task_ref->pid); in get_vas_user_win_ref()
86 mmgrab(task_ref->mm); in get_vas_user_win_ref()
87 mmput(task_ref->mm); in get_vas_user_win_ref()
95 task_ref->tgid = find_get_pid(task_tgid_vnr(current)); in get_vas_user_win_ref()
104 static bool ref_get_pid_and_task(struct vas_user_win_ref *task_ref, in ref_get_pid_and_task() argument
110 pid = task_ref->pid; in ref_get_pid_and_task()
113 pid = task_ref->tgid; in ref_get_pid_and_task()
147 struct vas_user_win_ref *task_ref) in vas_update_csb() argument
160 if (WARN_ON_ONCE(!task_ref->mm)) in vas_update_csb()
196 if (!ref_get_pid_and_task(task_ref, &tsk, &pid)) in vas_update_csb()
199 kthread_use_mm(task_ref->mm); in vas_update_csb()
211 kthread_unuse_mm(task_ref->mm); in vas_update_csb()
319 mutex_init(&txwin->task_ref.mmap_mutex); in coproc_ioc_tx_win_open()
423 if (txwin->task_ref.vma != vmf->vma) { in vas_mmap_fault()
429 mutex_lock(&txwin->task_ref.mmap_mutex); in vas_mmap_fault()
441 mutex_unlock(&txwin->task_ref.mmap_mutex); in vas_mmap_fault()
445 mutex_unlock(&txwin->task_ref.mmap_mutex); in vas_mmap_fault()
511 mutex_lock(&txwin->task_ref.mmap_mutex); in coproc_mmap()
539 txwin->task_ref.vma = vma; in coproc_mmap()
543 mutex_unlock(&txwin->task_ref.mmap_mutex); in coproc_mmap()