/* 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 *p, unsigned int cpu)
/* 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 *p, unsigned int cpu)
{
	if (!wait_task_inactive(p, TASK_UNINTERRUPTIBLE)) {
		WARN_ON(1);
		return;
	}
	p->cpus_allowed = cpumask_of_cpu(cpu);
	p->rt.nr_cpus_allowed = 1;
	p->flags |= PF_THREAD_BOUND;
}