Cool Goose
Cool Goose

Reputation: 998

Can I set RT priority to user level threads?

Can I set RT priority to user level threads? If no, what are the priority levels defined for user process?

Upvotes: 2

Views: 303

Answers (1)

Gil Hamilton
Gil Hamilton

Reputation: 12357

Yes. See sched_setscheduler(2). Use either SCHED_FIFO or SCHED_RR. Unless you have two different threads with the exact same priority in SCHED_RR, they are basically identical.

(For the pthreads version, see the analogous pthread_setschedparam(3).

Upvotes: 2

Related Questions