1-2.c revision 1b8a2eaac9978e1f9a829e5e38dc39c892c77c75
1/*
2 *  This program is free software; you can redistribute it and/or modify
3 *  it under the terms of the GNU General Public License version 2.
4 *
5 *  This program is distributed in the hope that it will be useful,
6 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
7 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8 *  GNU General Public License for more details.
9 *
10 *
11 * Test that sched_get_priority_min() returns the appropriate minimum value on
12 * success for SCHED_FIFO policy.
13 */
14#include <stdio.h>
15#include <sched.h>
16#include <errno.h>
17#include "posixtest.h"
18
19int main(int argc, char **argv)
20{
21	int result = -1;
22
23	result = sched_get_priority_min(SCHED_FIFO);
24
25	if(result != -1 && errno == 0 ) {
26		printf("The minimum priority for policy SCHED_FIFO is %i.\n",
27		       result);
28		printf("Test PASSED\n");
29		return PTS_PASS;
30	} else {
31		perror("An error occurs");
32		return PTS_FAIL;
33	}
34
35	printf("This code should not be executed.\n");
36        return PTS_UNRESOLVED;
37}
38
39
40