I created two threads and have set the priorities of the two threads using struct schedparam p1,p2; but when i execute my program , it does not preempt the lower priority task and put higher priority task in running state, wat is the problem? please reply

can someone tell me the alternative of sched_yield() ?

thanks