struct sched_param sched_param;
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO) + THREAD_PRIORITY_VALUE;
if(pthread_setschedparam(pthread_self(), SCHED_FIFO, &sched_param) != 0)
{
printf("Failed \n");
}
Advertisement
struct sched_param sched_param;
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO) + THREAD_PRIORITY_VALUE;
if(pthread_setschedparam(pthread_self(), SCHED_FIFO, &sched_param) != 0)
{
printf("Failed \n");
}