source: rtems/cpukit/posix/inline/rtems/posix/priority.inl @ e21cf313

4.104.114.84.95
Last change on this file since e21cf313 was 503dc058, checked in by Joel Sherrill <joel.sherrill@…>, on 07/03/96 at 14:20:03

switched from "STATIC INLINE" to "RTEMS_INLINE_ROUTINE"

  • Property mode set to 100644
File size: 684 bytes
Line 
1/* 
2 *  $Id$
3 */
4
5#ifndef __RTEMS_POSIX_PRIORITY_inl
6#define __RTEMS_POSIX_PRIORITY_inl
7
8/*
9 *  1003.1b-1993,2.2.2.80 definition of priority, p. 19
10 *
11 *  "Numericallly higher values represent higher priorities."
12 *
13 *  Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
14 */
15
16RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid(
17  int priority
18)
19{
20  return (boolean) (priority >= 1 && priority <= 255);
21}
22
23RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
24  int priority
25)
26{
27  return (Priority_Control) (256 - priority);
28}
29
30RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
31  Priority_Control priority
32)
33{
34  return 256 - priority;
35}
36
37#endif
Note: See TracBrowser for help on using the repository browser.