theDarkerHorse
theDarkerHorse

Reputation: 111

How many levels of thread priorities are there?

I was wondering how many levels of thread priorities are there?. Is it dependent on the OS that uses posix ?

Upvotes: 0

Views: 49

Answers (2)

Duck
Duck

Reputation: 27552

It depends on the implementation used by your OS. You should use

int sched_get_priority_min(int policy);

int sched_get_priority_max(int policy);

to find the range for a particular scheduling policy on your platform.

Upvotes: 1

Dheeraj Bhaskar
Dheeraj Bhaskar

Reputation: 19039

Depends on Schedule Policy

Here are the various values: pthread priority limits

source

Upvotes: 1

Related Questions