- * kthread_bind - bind a just-created kthread to a cpu.
- * @k: thread created by kthread_create().
- * @cpu: cpu (might not be online, must be possible) for @k to run on.
- *
- * Description: This function is equivalent to set_cpus_allowed(),
- * except that @cpu doesn't need to be online, and the thread must be
- * stopped (i.e., just returned from kthread_create()).
- */
-void kthread_bind(struct task_struct *k, unsigned int cpu)
-{
- if (k->state != TASK_UNINTERRUPTIBLE) {
- WARN_ON(1);
- return;
- }
- /* Must have done schedule() in kthread() before we set_task_cpu */
- wait_task_inactive(k);
- set_task_cpu(k, cpu);
- k->cpus_allowed = cpumask_of_cpu(cpu);
-}
-EXPORT_SYMBOL(kthread_bind);
-
-/**