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

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/**
2 * @file rtems/score/priority.h
3 *
4 * @brief Thread Priority Manipulation Routines
5 *
6 * This include file contains all thread priority manipulation routines.
7 * This Handler provides mechanisms which can be used to
8 * initialize and manipulate thread priorities.
9 */
10
11/*
12 *  COPYRIGHT (c) 1989-2011.
13 *  On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.rtems.org/license/LICENSE.
18 */
19
20#ifndef _RTEMS_SCORE_PRIORITY_H
21#define _RTEMS_SCORE_PRIORITY_H
22
23/**
24 *  @defgroup ScorePriority Priority Handler
25 *
26 *  @ingroup Score
27 *
28 *  This handler encapsulates functionality which is used to manage
29 *  thread priorities.  At the SuperCore level 256 priority levels
30 *  are supported with lower numbers representing logically more important
31 *  threads.  The priority level 0 is reserved for internal RTEMS use.
32 *  Typically it is assigned to threads which defer internal RTEMS
33 *  actions from an interrupt to thread level to improve interrupt response.
34 *  Priority level 255 is assigned to the IDLE thread and really should not
35 *  be used by application threads.  The default IDLE thread implementation
36 *  is an infinite "branch to self" loop which never yields to other threads
37 *  at the same priority.
38 */
39/**@{*/
40
41/*
42 * Processor specific information.
43 */
44#include <rtems/score/cpu.h>
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50/**
51 *  The following type defines the control block used to manage
52 *  thread priorities.
53 *
54 *  @note Priority 0 is reserved for internal threads only.
55 */
56typedef uint32_t   Priority_Control;
57
58/** This defines the highest (most important) thread priority. */
59#define PRIORITY_MINIMUM      0
60
61/** This defines the default lowest (least important) thread priority. */
62#if defined (CPU_PRIORITY_MAXIMUM)
63  #define PRIORITY_DEFAULT_MAXIMUM      CPU_PRIORITY_MAXIMUM
64#else
65  #define PRIORITY_DEFAULT_MAXIMUM      255
66#endif
67
68/** This defines the lowest (least important) thread priority. */
69#define PRIORITY_MAXIMUM      rtems_maximum_priority
70
71/**
72 *  This variable contains the configured number of priorities
73 */
74extern uint8_t rtems_maximum_priority;
75
76#ifdef __cplusplus
77}
78#endif
79
80/**@}*/
81
82#endif
83/* end of include file */
Note: See TracBrowser for help on using the repository browser.