source: rtems/cpukit/score/include/rtems/score/priority.h @ 1a8fde6c

4.104.114.84.95
Last change on this file since 1a8fde6c was 1a8fde6c, checked in by Joel Sherrill <joel.sherrill@…>, on 03/06/96 at 21:34:57

Removed prototyes for static inline routines and moved the comments into
the inline implementation. The impetus for this was twofold. First,
it is incorrect to have static inline prototypes when using the macro
implementation. Second, this reduced the number of lines in the include
files seen by rtems.h by about 2000 lines.

Next we restricted visibility for the inline routines to inside the
executive itself EXCEPT for a handful of objects. This reduced the
number of include files included by rtems.h by 40 files and reduced
the lines in the include files seen by rtems.h by about 6000 lines.

In total, these reduced the compile time of the entire RTEMS tree by 20%.
This results in about 8 minutes savings on the SparcStation? 10 morgana.

  • Property mode set to 100644
File size: 2.7 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, 1990, 1991, 1992, 1993, 1994.
8 *  On-Line Applications Research Corporation (OAR).
9 *  All rights assigned to U.S. Government, 1994.
10 *
11 *  This material may be reproduced by or for the U.S. Government pursuant
12 *  to the copyright license under the clause at DFARS 252.227-7013.  This
13 *  notice must appear in all copies of this file and its derivatives.
14 *
15 *  $Id$
16 */
17
18#ifndef __PRIORITY_h
19#define __PRIORITY_h
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/*
26 *  The following type defines the control block used to manage
27 *  thread priorities.
28 *
29 *  NOTE: Priority 0 is reserved for internal threads only.
30 */
31
32typedef unsigned32 Priority_Control;
33
34#define PRIORITY_MINIMUM      0         /* highest thread priority */
35#define PRIORITY_MAXIMUM      255       /* lowest thread priority */
36
37/*
38 *  The following record defines the information associated with
39 *  each thread to manage its interaction with the priority bit maps.
40 */
41
42typedef struct {
43  Priority_Bit_map_control *minor;        /* addr of minor bit map slot */
44  Priority_Bit_map_control  ready_major;  /* priority bit map ready mask */
45  Priority_Bit_map_control  ready_minor;  /* priority bit map ready mask */
46  Priority_Bit_map_control  block_major;  /* priority bit map block mask */
47  Priority_Bit_map_control  block_minor;  /* priority bit map block mask */
48}   Priority_Information;
49
50/*
51 *  The following data items are the priority bit map.
52 *  Each of the sixteen bits used in the _Priority_Major_bit_map is
53 *  associated with one of the sixteen entries in the _Priority_Bit_map.
54 *  Each bit in the _Priority_Bit_map indicates whether or not there are
55 *  threads ready at a particular priority.  The mapping of
56 *  individual priority levels to particular bits is processor
57 *  dependent as is the value of each bit used to indicate that
58 *  threads are ready at that priority.
59 */
60
61EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
62EXTERN Priority_Bit_map_control _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.