---
name: "kthread_bind"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/kthread_bind"
---

# kthread\_bind(9)

bind a just-created kthread to a cpu.

## NAME

kthread\_bind - bind a just-created kthread to a cpu.

## SYNOPSIS

**void kthread\_bind(struct task\_struct \*** *p***, unsigned int** *cpu***);**

## ARGUMENTS

*p*

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**).

## COPYRIGHT
