URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 157 |
/*
|
/*
|
#notarget: cris*-*-elf
|
#notarget: cris*-*-elf
|
*/
|
*/
|
|
|
#include <sched.h>
|
#include <sched.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <errno.h>
|
#include <errno.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
struct sched_param sb;
|
struct sched_param sb;
|
sb.sched_priority = 0;
|
sb.sched_priority = 0;
|
if (sched_setscheduler (getpid (), SCHED_OTHER, &sb) != 0
|
if (sched_setscheduler (getpid (), SCHED_OTHER, &sb) != 0
|
|| sb.sched_priority != 0)
|
|| sb.sched_priority != 0)
|
abort ();
|
abort ();
|
sb.sched_priority = 5;
|
sb.sched_priority = 5;
|
if (sched_setscheduler (getpid (), SCHED_OTHER, &sb) != -1
|
if (sched_setscheduler (getpid (), SCHED_OTHER, &sb) != -1
|
|| errno != EINVAL
|
|| errno != EINVAL
|
|| sb.sched_priority != 5)
|
|| sb.sched_priority != 5)
|
abort ();
|
abort ();
|
printf ("pass\n");
|
printf ("pass\n");
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.