source: rtems/cpukit/posix/include/rtems/posix/priority.h @ a6608123

4.104.115
Last change on this file since a6608123 was a6608123, checked in by Joel Sherrill <joel.sherrill@…>, on 12/14/08 at 18:31:43

2008-12-14 Joel Sherrill <joel.sherrill@…>

  • itron/src/chg_pri.c, itron/src/cre_tsk.c, itron/src/rot_rdq.c, posix/Makefile.am, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/priority.h, posix/src/mutex.c, score/include/rtems/score/priority.h: Run all tests successfully with maxixum number of priorities as 16 instead of 256. This was done by temporarily modifying the score priority.h maximum. This allowed testing of all API code to ensure that it worked properly with a reduced number of priorities. Most modifications were to switch from hard-coded maximum to using the SuperCore? variable based upon configured number.
  • posix/src/mutexdefaultattributes.c: Removed.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 * @file rtems/posix/priority.h
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-2007.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef _RTEMS_POSIX_PRIORITY_H
17#define _RTEMS_POSIX_PRIORITY_H
18
19#include <rtems/score/priority.h>
20
21/*
22 *  1003.1b-1993,2.2.2.80 definition of priority, p. 19
23 *
24 *  "Numerically higher values represent higher priorities."
25 *
26 *  Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
27 *
28 *  There are only 254 posix priority levels since a task at priority level
29 *  255 would never run because of the RTEMS idle task.  This is necessary
30 *  because GNAT maps the lowest Ada task priority to the lowest thread
31 *  priority.  The lowest priority Ada task should get to run, so there is
32 *  a fundamental conflict with having 255 priorities.
33 *
34 *  But since RTEMS can be configured with fewer than 256 priorities,
35 *  we use the internal constant.
36 */
37
38#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (PRIORITY_MAXIMUM - 1)
39
40#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
41
42RTEMS_INLINE_ROUTINE bool _POSIX_Priority_Is_valid(
43  int priority
44);
45
46RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
47  int priority
48);
49
50RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
51  Priority_Control priority
52);
53
54#include <rtems/posix/priority.inl>
55
56#endif
Note: See TracBrowser for help on using the repository browser.