source: rtems/cpukit/posix/inline/rtems/posix/priority.inl @ 6881e0c

4.104.114.84.95
Last change on this file since 6881e0c was 6881e0c, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 15, 1997 at 6:02:18 PM

Reduced number of POSIX thread priorities from 255 to 254 to avoid conflicts
of lowest priority with the RTEMS IDLE thread. This was causing the lowest
priority GNAT Ada task to never run.

  • 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 <= 254);
21}
22
23RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
24  int priority
25)
26{
27  return (Priority_Control) (255 - priority);
28}
29
30RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
31  Priority_Control priority
32)
33{
34  return 255 - priority;
35}
36
37#endif
Note: See TracBrowser for help on using the repository browser.