Set pthread Thread Priority


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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 34 other followers