source: rtems/cpukit/score/include/rtems/score/priority.h @ a55e305

4.115
Last change on this file since a55e305 was a55e305, checked in by Joel Sherrill <joel.sherrill@…>, on 07/29/10 at 17:52:10

2010-07-29 Gedare Bloom <giddyup44@…>

PR 1635/cpukit

  • sapi/src/exinit.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/bitfield.h, score/include/rtems/score/priority.h, score/include/rtems/score/thread.h, score/inline/rtems/score/priority.inl, score/inline/rtems/score/thread.inl, score/src/threadchangepriority.c, score/src/threadclearstate.c, score/src/threadready.c, score/src/threadresume.c, score/src/threadsetpriority.c, score/src/threadsetstate.c, score/src/threadsettransient.c, score/src/threadsuspend.c: Refactoring of priority handling, to isolate the bitmap implementation of priorities in the supercore so that priority management is a little more modular. This change is in anticipation of scheduler implementations that can select how they manage tracking priority levels / finding the highest priority ready task. Note that most of the changes here are simple renaming, to clarify the use of the bitmap-based priority management.
  • score/include/rtems/score/prioritybitmap.h, score/inline/rtems/score/prioritybitmap.inl: New files.
  • Property mode set to 100644
File size: 2.3 KB
Line 
1/**
2 *  @file  rtems/score/priority.h
3 *
4 *  This include file contains all thread priority manipulation routines.
5 *  This Handler provides mechanisms which can be used to
6 *  initialize and manipulate thread priorities.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2010.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef _RTEMS_SCORE_PRIORITY_H
21#define _RTEMS_SCORE_PRIORITY_H
22
23/**
24 *  @defgroup ScorePriority Priority Handler
25 *
26 *  This handler encapsulates functionality which is used to manage
27 *  thread priorities.  At the SuperCore level 256 priority levels
28 *  are supported with lower numbers representing logically more important
29 *  threads.  The priority level 0 is reserved for internal RTEMS use.
30 *  Typically it is assigned to threads which defer internal RTEMS
31 *  actions from an interrupt to thread level to improve interrupt response.
32 *  Priority level 255 is assigned to the IDLE thread and really should not
33 *  be used by application threads.  The default IDLE thread implementation
34 *  is an infinite "branch to self" loop which never yields to other threads
35 *  at the same priority.
36 */
37/**@{*/
38
39/*
40 * Processor specific information.
41 */
42#include <rtems/score/cpu.h>
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/**
49 *  The following type defines the control block used to manage
50 *  thread priorities.
51 *
52 *  @note Priority 0 is reserved for internal threads only.
53 */
54typedef uint32_t   Priority_Control;
55
56/** This defines the highest (most important) thread priority. */
57#define PRIORITY_MINIMUM      0
58
59/** This defines the default lowest (least important) thread priority. */
60#if defined (CPU_PRIORITY_MAXIMUM)
61  #define PRIORITY_DEFAULT_MAXIMUM      CPU_PRIORITY_MAXIMUM
62#else
63  #define PRIORITY_DEFAULT_MAXIMUM      255
64#endif
65
66/** This defines the lowest (least important) thread priority. */
67#define PRIORITY_MAXIMUM      rtems_maximum_priority
68
69/**
70 *  This variable contains the configured number of priorities
71 */
72extern uint8_t rtems_maximum_priority;
73
74#ifndef __RTEMS_APPLICATION__
75#include <rtems/score/priority.inl>
76#endif
77
78#ifdef __cplusplus
79}
80#endif
81
82/**@}*/
83
84#endif
85/* end of include file */
Note: See TracBrowser for help on using the repository browser.