wiringPi Version 2 - First commit (of v2)

This commit is contained in:
Gordon Henderson
2013-05-13 19:43:26 +01:00
parent 98bcb20d93
commit da38443cb2
97 changed files with 11243 additions and 1617 deletions

View File

@@ -36,15 +36,16 @@
*********************************************************************************
*/
int piHiPri (int pri)
int piHiPri (const int pri)
{
struct sched_param sched ;
memset (&sched, 0, sizeof(sched)) ;
if (pri > sched_get_priority_max (SCHED_RR))
pri = sched_get_priority_max (SCHED_RR) ;
sched.sched_priority = sched_get_priority_max (SCHED_RR) ;
else
sched.sched_priority = pri ;
sched.sched_priority = pri ;
return sched_setscheduler (0, SCHED_RR, &sched) ;
}