Lines Matching refs:flags
57 unsigned long flags; member
84 WARN_ON(!(k->flags & PF_KTHREAD)); in to_kthread()
101 if (kthread && !(p->flags & PF_KTHREAD)) in __to_kthread()
168 return test_bit(KTHREAD_SHOULD_STOP, &to_kthread(current)->flags); in kthread_should_stop()
174 return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(k)->flags); in __kthread_should_park()
201 return kthread->flags & (BIT(KTHREAD_SHOULD_STOP) | BIT(KTHREAD_SHOULD_PARK)); in kthread_should_stop_or_park()
290 if (!test_bit(KTHREAD_SHOULD_PARK, &self->flags)) in __kthread_parkme()
456 if (!(current->flags & PF_NO_SETAFFINITY) && !self->preferred_affinity) in kthread()
460 if (!test_bit(KTHREAD_SHOULD_STOP, &self->flags)) { in kthread()
596 unsigned long flags; in __kthread_bind_mask() local
604 raw_spin_lock_irqsave(&p->pi_lock, flags); in __kthread_bind_mask()
606 p->flags |= PF_NO_SETAFFINITY; in __kthread_bind_mask()
607 raw_spin_unlock_irqrestore(&p->pi_lock, flags); in __kthread_bind_mask()
672 WARN_ON_ONCE(!(k->flags & PF_NO_SETAFFINITY)); in kthread_set_per_cpu()
675 clear_bit(KTHREAD_IS_PER_CPU, &kthread->flags); in kthread_set_per_cpu()
680 set_bit(KTHREAD_IS_PER_CPU, &kthread->flags); in kthread_set_per_cpu()
689 return test_bit(KTHREAD_IS_PER_CPU, &kthread->flags); in kthread_is_per_cpu()
704 if (!test_bit(KTHREAD_SHOULD_PARK, &kthread->flags)) in kthread_unpark()
710 if (test_bit(KTHREAD_IS_PER_CPU, &kthread->flags)) in kthread_unpark()
713 clear_bit(KTHREAD_SHOULD_PARK, &kthread->flags); in kthread_unpark()
737 if (WARN_ON(k->flags & PF_EXITING)) in kthread_park()
740 if (WARN_ON_ONCE(test_bit(KTHREAD_SHOULD_PARK, &kthread->flags))) in kthread_park()
743 set_bit(KTHREAD_SHOULD_PARK, &kthread->flags); in kthread_park()
786 set_bit(KTHREAD_SHOULD_STOP, &kthread->flags); in kthread_stop()
828 current->flags |= PF_NOFREEZE; in kthreadd()
860 unsigned long flags; in kthread_affine_preferred() local
886 raw_spin_lock_irqsave(&p->pi_lock, flags); in kthread_affine_preferred()
888 raw_spin_unlock_irqrestore(&p->pi_lock, flags); in kthread_affine_preferred()
922 if (WARN_ON_ONCE((k->task->flags & PF_NO_SETAFFINITY) || in kthreads_online_cpu()
982 if (worker->flags & KTW_FREEZABLE) in kthread_worker_fn()
1034 __kthread_create_worker_on_node(unsigned int flags, int node, in __kthread_create_worker_on_node() argument
1051 worker->flags = flags; in __kthread_create_worker_on_node()
1072 kthread_create_worker_on_node(unsigned int flags, int node, const char namefmt[], ...) in kthread_create_worker_on_node() argument
1078 worker = __kthread_create_worker_on_node(flags, node, namefmt, args); in kthread_create_worker_on_node()
1122 kthread_create_worker_on_cpu(int cpu, unsigned int flags, in kthread_create_worker_on_cpu() argument
1127 worker = kthread_create_worker_on_node(flags, cpu_to_node(cpu), namefmt, cpu); in kthread_create_worker_on_cpu()
1188 unsigned long flags; in kthread_queue_work() local
1190 raw_spin_lock_irqsave(&worker->lock, flags); in kthread_queue_work()
1195 raw_spin_unlock_irqrestore(&worker->lock, flags); in kthread_queue_work()
1214 unsigned long flags; in kthread_delayed_work_timer_fn() local
1223 raw_spin_lock_irqsave(&worker->lock, flags); in kthread_delayed_work_timer_fn()
1233 raw_spin_unlock_irqrestore(&worker->lock, flags); in kthread_delayed_work_timer_fn()
1286 unsigned long flags; in kthread_queue_delayed_work() local
1289 raw_spin_lock_irqsave(&worker->lock, flags); in kthread_queue_delayed_work()
1296 raw_spin_unlock_irqrestore(&worker->lock, flags); in kthread_queue_delayed_work()
1359 unsigned long *flags) in kthread_cancel_delayed_work_timer() argument
1372 raw_spin_unlock_irqrestore(&worker->lock, *flags); in kthread_cancel_delayed_work_timer()
1374 raw_spin_lock_irqsave(&worker->lock, *flags); in kthread_cancel_delayed_work_timer()
1433 unsigned long flags; in kthread_mod_delayed_work() local
1436 raw_spin_lock_irqsave(&worker->lock, flags); in kthread_mod_delayed_work()
1459 kthread_cancel_delayed_work_timer(work, &flags); in kthread_mod_delayed_work()
1470 raw_spin_unlock_irqrestore(&worker->lock, flags); in kthread_mod_delayed_work()
1478 unsigned long flags; in __kthread_cancel_work_sync() local
1484 raw_spin_lock_irqsave(&worker->lock, flags); in __kthread_cancel_work_sync()
1489 kthread_cancel_delayed_work_timer(work, &flags); in __kthread_cancel_work_sync()
1501 raw_spin_unlock_irqrestore(&worker->lock, flags); in __kthread_cancel_work_sync()
1503 raw_spin_lock_irqsave(&worker->lock, flags); in __kthread_cancel_work_sync()
1507 raw_spin_unlock_irqrestore(&worker->lock, flags); in __kthread_cancel_work_sync()
1605 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD)); in kthread_use_mm()
1650 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD)); in kthread_unuse_mm()
1690 if (!(current->flags & PF_KTHREAD)) in kthread_associate_blkcg()
1716 if (current->flags & PF_KTHREAD) { in kthread_blkcg()