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? :D