source: rtems/cpukit/posix/inline/rtems/posix/priority.inl @ 956286d

4.104.114.95
Last change on this file since 956286d was 956286d, checked in by Joel Sherrill <joel.sherrill@…>, on 11/30/07 at 17:02:15

2007-11-30 Joel Sherrill <joel.sherrill@…>

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