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

4.104.114.84.95
Last change on this file since d6154c7 was d6154c7, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/29/04 at 16:41:13

2004-03-29 Ralf Corsepius <ralf_corsepius@…>

  • score/include/rtems/debug.h, score/include/rtems/score/bitfield.h, score/include/rtems/score/chain.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/object.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/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/coremsg.inl, score/inline/rtems/score/coresem.inl, score/inline/rtems/score/heap.inl, score/inline/rtems/score/isr.inl, score/inline/rtems/score/object.inl, score/inline/rtems/score/priority.inl, score/inline/rtems/score/stack.inl, score/inline/rtems/score/thread.inl, score/inline/rtems/score/tqdata.inl, score/inline/rtems/score/userext.inl, score/inline/rtems/score/wkspace.inl, score/macros/rtems/score/address.inl, score/macros/rtems/score/heap.inl, score/macros/rtems/score/object.inl, score/macros/rtems/score/priority.inl, score/macros/rtems/score/userext.inl: Convert to using c99 fixed size types.
  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*  priority.h
2 *
3 *  This include file contains all thread priority manipulation routines.
4 *  This Handler provides mechanisms which can be used to
5 *  initialize and manipulate thread priorities.
6 *
7 *  COPYRIGHT (c) 1989-1999.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16
17#ifndef __PRIORITY_h
18#define __PRIORITY_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/*
25 *  The following type defines the control block used to manage
26 *  thread priorities.
27 *
28 *  NOTE: Priority 0 is reserved for internal threads only.
29 */
30
31typedef uint32_t   Priority_Control;
32
33#define PRIORITY_MINIMUM      0         /* highest thread priority */
34#define PRIORITY_MAXIMUM      255       /* lowest thread priority */
35
36/*
37 *  The following record defines the information associated with
38 *  each thread to manage its interaction with the priority bit maps.
39 */
40
41typedef struct {
42  Priority_Bit_map_control *minor;        /* addr of minor bit map slot */
43  Priority_Bit_map_control  ready_major;  /* priority bit map ready mask */
44  Priority_Bit_map_control  ready_minor;  /* priority bit map ready mask */
45  Priority_Bit_map_control  block_major;  /* priority bit map block mask */
46  Priority_Bit_map_control  block_minor;  /* priority bit map block mask */
47}   Priority_Information;
48
49/*
50 *  The following data items are the priority bit map.
51 *  Each of the sixteen bits used in the _Priority_Major_bit_map is
52 *  associated with one of the sixteen entries in the _Priority_Bit_map.
53 *  Each bit in the _Priority_Bit_map indicates whether or not there are
54 *  threads ready at a particular priority.  The mapping of
55 *  individual priority levels to particular bits is processor
56 *  dependent as is the value of each bit used to indicate that
57 *  threads are ready at that priority.
58 */
59
60SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
61SCORE_EXTERN Priority_Bit_map_control
62               _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
63
64/*
65 *  The definition of the Priority_Bit_map_control type is CPU dependent.
66 *
67 */
68
69/*
70 *  Priority Bitfield Manipulation Routines
71 *
72 *  NOTE:
73 *
74 *  These may simply be pass throughs to CPU dependent routines.
75 */
76 
77#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
78
79#define _Priority_Mask( _bit_number ) \
80  _CPU_Priority_Mask( _bit_number )
81 
82#define _Priority_Bits_index( _priority ) \
83  _CPU_Priority_bits_index( _priority )
84
85#endif
86 
87#ifndef __RTEMS_APPLICATION__
88#include <rtems/score/priority.inl>
89#endif
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif
96/* end of include file */
Note: See TracBrowser for help on using the repository browser.