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

4.104.114.84.95
Last change on this file since baff4da was baff4da, checked in by Joel Sherrill <joel.sherrill@…>, on 11/01/04 at 13:22:41

2004-11-01 Joel Sherrill <joel@…>

  • score/cpu/no_cpu/rtems/score/cpu.h, score/include/rtems/debug.h, score/include/rtems/seterr.h, score/include/rtems/system.h, score/include/rtems/score/address.h, score/include/rtems/score/apiext.h, score/include/rtems/score/apimutex.h, score/include/rtems/score/bitfield.h, score/include/rtems/score/chain.h, score/include/rtems/score/context.h, score/include/rtems/score/copyrt.h, score/include/rtems/score/coremsg.h, score/include/rtems/score/coremutex.h, score/include/rtems/score/coresem.h, score/include/rtems/score/heap.h, score/include/rtems/score/interr.h, score/include/rtems/score/isr.h, score/include/rtems/score/mpci.h, score/include/rtems/score/mppkt.h, score/include/rtems/score/objectmp.h, score/include/rtems/score/priority.h, score/include/rtems/score/stack.h, score/include/rtems/score/states.h, score/include/rtems/score/sysstate.h, score/include/rtems/score/thread.h, score/include/rtems/score/threadmp.h, score/include/rtems/score/threadq.h, score/include/rtems/score/tod.h, score/include/rtems/score/tqdata.h, score/include/rtems/score/userext.h, score/include/rtems/score/watchdog.h, score/include/rtems/score/wkspace.h, score/inline/rtems/score/address.inl, score/inline/rtems/score/chain.inl, score/inline/rtems/score/coremsg.inl, score/inline/rtems/score/coremutex.inl, score/inline/rtems/score/coresem.inl, score/inline/rtems/score/heap.inl, score/inline/rtems/score/isr.inl, score/inline/rtems/score/mppkt.inl, score/inline/rtems/score/objectmp.inl, score/inline/rtems/score/priority.inl, score/inline/rtems/score/stack.inl, score/inline/rtems/score/states.inl, score/inline/rtems/score/sysstate.inl, score/inline/rtems/score/thread.inl, score/inline/rtems/score/threadmp.inl, score/inline/rtems/score/tod.inl, score/inline/rtems/score/tqdata.inl, score/inline/rtems/score/userext.inl, score/inline/rtems/score/watchdog.inl, score/inline/rtems/score/wkspace.inl: Add Doxygen comments -- working modifications which are not complete and may have broken code. Committing so work and testing can proceed.
  • score/Doxyfile, score/mainpage.h: New files.
  • Property mode set to 100644
File size: 2.8 KB
Line 
1/**
2 *  @file 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-2004.
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 __PRIORITY_h
21#define __PRIORITY_h
22
23/**
24 *  @defgroup ScorePriority Priority Handler
25 *
26 *  This group contains functionality which XXX
27 */
28/**@{*/
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34/*
35 *  The following type defines the control block used to manage
36 *  thread priorities.
37 *
38 *  @note Priority 0 is reserved for internal threads only.
39 */
40
41typedef uint32_t   Priority_Control;
42
43#define PRIORITY_MINIMUM      0         /* highest thread priority */
44#define PRIORITY_MAXIMUM      255       /* lowest thread priority */
45
46/*
47 *  The following record defines the information associated with
48 *  each thread to manage its interaction with the priority bit maps.
49 */
50
51typedef struct {
52  Priority_Bit_map_control *minor;        /* addr of minor bit map slot */
53  Priority_Bit_map_control  ready_major;  /* priority bit map ready mask */
54  Priority_Bit_map_control  ready_minor;  /* priority bit map ready mask */
55  Priority_Bit_map_control  block_major;  /* priority bit map block mask */
56  Priority_Bit_map_control  block_minor;  /* priority bit map block mask */
57}   Priority_Information;
58
59/*
60 *  The following data items are the priority bit map.
61 *  Each of the sixteen bits used in the _Priority_Major_bit_map is
62 *  associated with one of the sixteen entries in the _Priority_Bit_map.
63 *  Each bit in the _Priority_Bit_map indicates whether or not there are
64 *  threads ready at a particular priority.  The mapping of
65 *  individual priority levels to particular bits is processor
66 *  dependent as is the value of each bit used to indicate that
67 *  threads are ready at that priority.
68 */
69
70SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
71SCORE_EXTERN Priority_Bit_map_control
72               _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
73
74/*
75 *  The definition of the Priority_Bit_map_control type is CPU dependent.
76 *
77 */
78
79/*
80 *  Priority Bitfield Manipulation Routines
81 *
82 *  @note
83 *
84 *  These may simply be pass throughs to CPU dependent routines.
85 */
86
87#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
88
89#define _Priority_Mask( _bit_number ) \
90  _CPU_Priority_Mask( _bit_number )
91
92#define _Priority_Bits_index( _priority ) \
93  _CPU_Priority_bits_index( _priority )
94
95#endif
96
97#ifndef __RTEMS_APPLICATION__
98#include <rtems/score/priority.inl>
99#endif
100
101#ifdef __cplusplus
102}
103#endif
104
105/**@}*/
106
107#endif
108/* end of include file */
Note: See TracBrowser for help on using the repository browser.