source: rtems/cpukit/posix/src/sched_getprioritymax.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 889 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Returns the Appropriate Maximum for Scheduling policy
5 * @ingroup POSIXAPI
6 */
7
8/*
9 *  13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
10 *
11 *  COPYRIGHT (c) 1989-2007.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.org/license/LICENSE.
17 */
18
19#if HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <sched.h>
24#include <errno.h>
25
26#include <rtems/system.h>
27#include <rtems/seterr.h>
28#include <rtems/posix/priorityimpl.h>
29
30int sched_get_priority_max(
31  int  policy
32)
33{
34  switch ( policy ) {
35    case SCHED_OTHER:
36    case SCHED_FIFO:
37    case SCHED_RR:
38    case SCHED_SPORADIC:
39      break;
40
41    default:
42      rtems_set_errno_and_return_minus_one( EINVAL );
43  }
44
45  return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
46}
Note: See TracBrowser for help on using the repository browser.