• Home
  • Raw
  • Download

Lines Matching refs:task

327 static __always_inline int __waiter_prio(struct task_struct *task)  in __waiter_prio()  argument
329 int prio = task->prio; in __waiter_prio()
332 trace_android_vh_rtmutex_waiter_prio(task, &waiter_prio); in __waiter_prio()
343 waiter_update_prio(struct rt_mutex_waiter *waiter, struct task_struct *task) in waiter_update_prio() argument
345 waiter->prio = __waiter_prio(task); in waiter_update_prio()
346 waiter->deadline = task->dl.deadline; in waiter_update_prio()
472 rt_mutex_enqueue_pi(struct task_struct *task, struct rt_mutex_waiter *waiter) in rt_mutex_enqueue_pi() argument
474 rb_add_cached(&waiter->pi_tree_entry, &task->pi_waiters, __pi_waiter_less); in rt_mutex_enqueue_pi()
478 rt_mutex_dequeue_pi(struct task_struct *task, struct rt_mutex_waiter *waiter) in rt_mutex_dequeue_pi() argument
483 rb_erase_cached(&waiter->pi_tree_entry, &task->pi_waiters); in rt_mutex_dequeue_pi()
494 pi_task = task_top_pi_waiter(p)->task; in rt_mutex_adjust_prio()
501 struct task_struct *task, in rt_mutex_wake_q_add_task() argument
507 get_task_struct(task); in rt_mutex_wake_q_add_task()
508 wqh->rtlock_task = task; in rt_mutex_wake_q_add_task()
510 wake_q_add(&wqh->head, task); in rt_mutex_wake_q_add_task()
517 rt_mutex_wake_q_add_task(wqh, w->task, w->wake_state); in rt_mutex_wake_q_add()
625 static int __sched rt_mutex_adjust_prio_chain(struct task_struct *task, in rt_mutex_adjust_prio_chain() argument
664 put_task_struct(task); in rt_mutex_adjust_prio_chain()
679 raw_spin_lock_irq(&task->pi_lock); in rt_mutex_adjust_prio_chain()
684 waiter = task->pi_blocked_on; in rt_mutex_adjust_prio_chain()
748 if (!task_has_pi_waiters(task)) in rt_mutex_adjust_prio_chain()
756 if (top_waiter != task_top_pi_waiter(task)) { in rt_mutex_adjust_prio_chain()
771 if (rt_mutex_waiter_equal(waiter, task_to_waiter(task))) { in rt_mutex_adjust_prio_chain()
788 raw_spin_unlock_irq(&task->pi_lock); in rt_mutex_adjust_prio_chain()
831 raw_spin_unlock(&task->pi_lock); in rt_mutex_adjust_prio_chain()
832 put_task_struct(task); in rt_mutex_adjust_prio_chain()
844 task = get_task_struct(rt_mutex_owner(lock)); in rt_mutex_adjust_prio_chain()
845 raw_spin_lock(&task->pi_lock); in rt_mutex_adjust_prio_chain()
853 next_lock = task_blocked_on_lock(task); in rt_mutex_adjust_prio_chain()
860 raw_spin_unlock(&task->pi_lock); in rt_mutex_adjust_prio_chain()
895 waiter_update_prio(waiter, task); in rt_mutex_adjust_prio_chain()
900 raw_spin_unlock(&task->pi_lock); in rt_mutex_adjust_prio_chain()
901 put_task_struct(task); in rt_mutex_adjust_prio_chain()
918 wake_up_state(top_waiter->task, top_waiter->wake_state); in rt_mutex_adjust_prio_chain()
924 task = get_task_struct(rt_mutex_owner(lock)); in rt_mutex_adjust_prio_chain()
925 raw_spin_lock(&task->pi_lock); in rt_mutex_adjust_prio_chain()
935 rt_mutex_dequeue_pi(task, prerequeue_top_waiter); in rt_mutex_adjust_prio_chain()
936 rt_mutex_enqueue_pi(task, waiter); in rt_mutex_adjust_prio_chain()
937 rt_mutex_adjust_prio(task); in rt_mutex_adjust_prio_chain()
950 rt_mutex_dequeue_pi(task, waiter); in rt_mutex_adjust_prio_chain()
952 rt_mutex_enqueue_pi(task, waiter); in rt_mutex_adjust_prio_chain()
953 rt_mutex_adjust_prio(task); in rt_mutex_adjust_prio_chain()
971 next_lock = task_blocked_on_lock(task); in rt_mutex_adjust_prio_chain()
979 raw_spin_unlock(&task->pi_lock); in rt_mutex_adjust_prio_chain()
1003 raw_spin_unlock_irq(&task->pi_lock); in rt_mutex_adjust_prio_chain()
1005 put_task_struct(task); in rt_mutex_adjust_prio_chain()
1021 try_to_take_rt_mutex(struct rt_mutex_base *lock, struct task_struct *task, in try_to_take_rt_mutex() argument
1083 if (!rt_mutex_steal(task_to_waiter(task), in try_to_take_rt_mutex()
1109 raw_spin_lock(&task->pi_lock); in try_to_take_rt_mutex()
1110 task->pi_blocked_on = NULL; in try_to_take_rt_mutex()
1117 rt_mutex_enqueue_pi(task, rt_mutex_top_waiter(lock)); in try_to_take_rt_mutex()
1118 raw_spin_unlock(&task->pi_lock); in try_to_take_rt_mutex()
1125 rt_mutex_set_owner(lock, task); in try_to_take_rt_mutex()
1139 struct task_struct *task, in task_blocks_on_rt_mutex() argument
1162 if (owner == task && !(build_ww_mutex() && ww_ctx)) in task_blocks_on_rt_mutex()
1165 trace_android_vh_task_blocks_on_rtmutex(lock, waiter, task, ww_ctx, &chwalk); in task_blocks_on_rt_mutex()
1166 raw_spin_lock(&task->pi_lock); in task_blocks_on_rt_mutex()
1167 waiter->task = task; in task_blocks_on_rt_mutex()
1169 waiter_update_prio(waiter, task); in task_blocks_on_rt_mutex()
1176 task->pi_blocked_on = waiter; in task_blocks_on_rt_mutex()
1178 raw_spin_unlock(&task->pi_lock); in task_blocks_on_rt_mutex()
1187 raw_spin_lock(&task->pi_lock); in task_blocks_on_rt_mutex()
1189 task->pi_blocked_on = NULL; in task_blocks_on_rt_mutex()
1190 raw_spin_unlock(&task->pi_lock); in task_blocks_on_rt_mutex()
1232 next_lock, waiter, task); in task_blocks_on_rt_mutex()
1550 if (timeout && !timeout->task) { in rt_mutex_slowlock_block()