data/method/gdb/gdb-13.2/sim/testsuite/cris/c/sched9.c

25 lines
392 B
C
Raw Normal View History

2024-01-29 10:44:43 +08:00
/* Check corner error case: specifying invalid scheduling policy.
#progos: linux
*/
#include <sched.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
int main (void)
{
if (sched_get_priority_min (-1) != -1
|| errno != EINVAL)
abort ();
errno = 0;
if (sched_get_priority_max (-1) != -1
|| errno != EINVAL)
abort ();
printf ("pass\n");
exit (0);
}