Lines Matching refs:k
73 static inline struct kthread *to_kthread(struct task_struct *k) in to_kthread() argument
75 WARN_ON(!(k->flags & PF_KTHREAD)); in to_kthread()
76 return (__force void *)k->set_child_tid; in to_kthread()
79 void free_kthread_struct(struct task_struct *k) in free_kthread_struct() argument
87 kthread = to_kthread(k); in free_kthread_struct()
107 bool __kthread_should_park(struct task_struct *k) in __kthread_should_park() argument
109 return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(k)->flags); in __kthread_should_park()
472 void kthread_unpark(struct task_struct *k) in kthread_unpark() argument
474 struct kthread *kthread = to_kthread(k); in kthread_unpark()
481 __kthread_bind(k, kthread->cpu, TASK_PARKED); in kthread_unpark()
487 wake_up_state(k, TASK_PARKED); in kthread_unpark()
503 int kthread_park(struct task_struct *k) in kthread_park() argument
505 struct kthread *kthread = to_kthread(k); in kthread_park()
507 if (WARN_ON(k->flags & PF_EXITING)) in kthread_park()
514 if (k != current) { in kthread_park()
515 wake_up_process(k); in kthread_park()
525 WARN_ON_ONCE(!wait_task_inactive(k, TASK_PARKED)); in kthread_park()
547 int kthread_stop(struct task_struct *k) in kthread_stop() argument
552 trace_sched_kthread_stop(k); in kthread_stop()
554 get_task_struct(k); in kthread_stop()
555 kthread = to_kthread(k); in kthread_stop()
557 kthread_unpark(k); in kthread_stop()
558 wake_up_process(k); in kthread_stop()
560 ret = k->exit_code; in kthread_stop()
561 put_task_struct(k); in kthread_stop()