source: rtems/cpukit/rtems/include/rtems/rtems/modes.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.4 KB
Line 
1/*  modes.h
2 *
3 *  This include file contains all constants and structures associated
4 *  with the RTEMS thread and RTEMS_ASR modes.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_MODES_h
18#define __RTEMS_MODES_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/score/isr.h>
25
26/*
27 *  The following type defines the control block used to manage
28 *  each a mode set.
29 */
30
31typedef unsigned32 Modes_Control;
32
33/*
34 *  The following constants define the individual modes and masks
35 *  which may be used to compose a mode set and to alter modes.
36 */
37
38#define RTEMS_ALL_MODE_MASKS     0x0000ffff
39
40#define RTEMS_DEFAULT_MODES     0x00000000
41#define RTEMS_CURRENT_MODE      0
42
43#define RTEMS_PREEMPT_MASK    0x00000100  /* preemption bit           */
44#define RTEMS_TIMESLICE_MASK  0x00000200  /* timeslice bit            */
45#define RTEMS_ASR_MASK        0x00000400  /* RTEMS_ASR enable bit           */
46#define RTEMS_INTERRUPT_MASK  CPU_MODES_INTERRUPT_MASK
47
48#define RTEMS_PREEMPT      0x00000000     /* enable preemption        */
49#define RTEMS_NO_PREEMPT   0x00000100     /* disable preemption       */
50
51#define RTEMS_NO_TIMESLICE 0x00000000     /* disable timeslicing      */
52#define RTEMS_TIMESLICE    0x00000200     /* enable timeslicing       */
53
54#define RTEMS_ASR          0x00000000     /* enable RTEMS_ASR               */
55#define RTEMS_NO_ASR       0x00000400     /* disable RTEMS_ASR              */
56
57/*
58 *  The number of bits for interrupt levels is CPU dependent.
59 *  RTEMS supports 0 to 256 levels in bits 0-7 of the mode.
60 */
61
62/*PAGE
63 *
64 *  RTEMS_INTERRUPT_LEVEL
65 *
66 *  DESCRIPTION:
67 *
68 *  This function returns the processor dependent interrupt
69 *  level which corresponds to the requested interrupt level.
70 *
71 * NOTE: RTEMS supports 256 interrupt levels using the least
72 *       significant eight bits of MODES.CONTROL.  On any
73 *       particular CPU, fewer than 256 levels may be supported.
74 */
75
76#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \
77  ( (_mode_set) & RTEMS_INTERRUPT_MASK )
78 
79
80#ifndef __RTEMS_APPLICATION__
81#include <rtems/rtems/modes.inl>
82#endif
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif
89/* end of include file */
Note: See TracBrowser for help on using the repository browser.