source: rtems/cpukit/rtems/include/rtems/rtems/modes.h @ 4b487363

4.104.114.84.95
Last change on this file since 4b487363 was 4b487363, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/02/04 at 09:39:02

2004-10-02 Ralf Corsepius <ralf_corsepiu@…>

  • rtems/include/rtems.h, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/cache.h, rtems/include/rtems/rtems/clock.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/event.h, rtems/include/rtems/rtems/eventmp.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/intr.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/mp.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/options.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/partmp.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/semmp.h, rtems/include/rtems/rtems/signal.h, rtems/include/rtems/rtems/signalmp.h, rtems/include/rtems/rtems/status.h, rtems/include/rtems/rtems/support.h, rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/include/rtems/rtems/types.h: Add doxygen preamble.
  • Property mode set to 100644
File size: 2.3 KB
Line 
1/**
2 * @file rtems/rtems/modes.h
3 */
4
5/*
6 *  This include file contains all constants and structures associated
7 *  with the RTEMS thread and RTEMS_ASR modes.
8 *
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef __RTEMS_MODES_h
20#define __RTEMS_MODES_h
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <rtems/score/isr.h>
27
28/*
29 *  The following type defines the control block used to manage
30 *  each a mode set.
31 */
32
33typedef uint32_t   Modes_Control;
34
35/*
36 *  The following constants define the individual modes and masks
37 *  which may be used to compose a mode set and to alter modes.
38 */
39
40#define RTEMS_ALL_MODE_MASKS     0x0000ffff
41
42#define RTEMS_DEFAULT_MODES     0x00000000
43#define RTEMS_CURRENT_MODE      0
44
45#define RTEMS_PREEMPT_MASK    0x00000100  /* preemption bit           */
46#define RTEMS_TIMESLICE_MASK  0x00000200  /* timeslice bit            */
47#define RTEMS_ASR_MASK        0x00000400  /* RTEMS_ASR enable bit           */
48#define RTEMS_INTERRUPT_MASK  CPU_MODES_INTERRUPT_MASK
49
50#define RTEMS_PREEMPT      0x00000000     /* enable preemption        */
51#define RTEMS_NO_PREEMPT   0x00000100     /* disable preemption       */
52
53#define RTEMS_NO_TIMESLICE 0x00000000     /* disable timeslicing      */
54#define RTEMS_TIMESLICE    0x00000200     /* enable timeslicing       */
55
56#define RTEMS_ASR          0x00000000     /* enable RTEMS_ASR               */
57#define RTEMS_NO_ASR       0x00000400     /* disable RTEMS_ASR              */
58
59/*
60 *  The number of bits for interrupt levels is CPU dependent.
61 *  RTEMS supports 0 to 256 levels in bits 0-7 of the mode.
62 */
63
64/*PAGE
65 *
66 *  RTEMS_INTERRUPT_LEVEL
67 *
68 *  DESCRIPTION:
69 *
70 *  This function returns the processor dependent interrupt
71 *  level which corresponds to the requested interrupt level.
72 *
73 * NOTE: RTEMS supports 256 interrupt levels using the least
74 *       significant eight bits of MODES.CONTROL.  On any
75 *       particular CPU, fewer than 256 levels may be supported.
76 */
77
78#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \
79  ( (_mode_set) & RTEMS_INTERRUPT_MASK )
80
81
82#ifndef __RTEMS_APPLICATION__
83#include <rtems/rtems/modes.inl>
84#endif
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif
91/* end of include file */
Note: See TracBrowser for help on using the repository browser.