1KTHREAD_BIND(9) Driver Basics KTHREAD_BIND(9)
2
3
4
6 kthread_bind - bind a just-created kthread to a cpu.
7
9 void kthread_bind(struct task_struct * p, unsigned int cpu);
10
12 p
13 thread created by kthread_create.
14
15 cpu
16 cpu (might not be online, must be possible) for k to run on.
17
19 This function is equivalent to set_cpus_allowed, except that cpu
20 doesn´t need to be online, and the thread must be stopped (i.e., just
21 returned from kthread_create).
22
23 Function lives here instead of kthread.c because it messes with
24 scheduler internals which require locking.
25
27Kernel Hackers Manual 2.6. June 2019 KTHREAD_BIND(9)