Quote Originally Posted by brahan_7 View Post
You are using 'SCHED_FIFI', which I'm sure you know means First In First Out, this is different from 'SCHED_OTHER' which would be the kernel default way of scheduling the threads, 1 being highest priority and 99 being lowest priority, to stay within 1 - 140...

if you were to say:
Code:
sched_get_priority_max(SCHED_OTHER);
you should get 0 and
if you said:
Code:
sched_get_priority_max(SCHED_OTHER);
you should get 0 also because the kernel handles the priorities...

So, using 'SHED_FIFO' or 'SHED_RR' you have min/max | 1/99 priorities for those threads within the process that you created...

You basically figured it out...

You need to make sure that 'check_preempt_curr_rt( )' is using the same kind of sched mechanism (FIFO, RR, OTHER) that you are using when you create the process.

Google SCHED_FIFO...you can find documentation for sched mechanisms.

Does that help at all?
I use SCHED_FIFO since I am using the real-time scheduling class, which is the only class that supports SCHED_FIFO and SCHED_RR. But then Im right then the real-time class uses 99/1 | max/min.

Also check_preempt_curr_rt(..) can only be called by a task in the real-time class thus having the SCHED_FIFO or SCHED_RR policies so I got that covered.

What I am trying to do? Or I have done it now, is to implemend SCHED_SPORADIC in the real-time class. Anyway thanks for the help. If u are more intressted Im glad to tell u mor about it.