---
name: "sched_setscheduler"
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/sched_setscheduler/9"
---

# sched\_setscheduler(9)

change the scheduling policy and/or RT priority of a thread.

## NAME

sched\_setscheduler - change the scheduling policy and/or RT priority of a thread.

## SYNOPSIS

**int sched\_setscheduler(struct task\_struct \*** *p***, int** *policy***, const struct sched\_param \*** *param***);**

## ARGUMENTS

*p*

the task in question.

*policy*

new policy.

*param*

structure containing the new RT priority.

## RETURN

0 on success. An error code otherwise.

NOTE that the task may be already dead.

## COPYRIGHT
