source: rtems/cpukit/rtems/include/rtems/rtems/modes.h @ 1d496f6

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

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

  • rtems/include/rtems.h, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/clock.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/options.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/sem.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/inline/rtems/rtems/part.inl, rtems/inline/rtems/rtems/region.inl, rtems/macros/rtems/rtems/part.inl, rtems/src/attr.c, rtems/src/dpmem.c, rtems/src/dpmemcreate.c, rtems/src/dpmemexternal2internal.c, rtems/src/dpmeminternal2external.c, rtems/src/eventseize.c, rtems/src/msg.c, rtems/src/msgmp.c, rtems/src/msgqallocate.c, rtems/src/msgqbroadcast.c, rtems/src/msgqcreate.c, rtems/src/msgqflush.c, rtems/src/msgqgetnumberpending.c, rtems/src/msgqident.c, rtems/src/msgqreceive.c, rtems/src/msgqsend.c, rtems/src/msgqsubmit.c, rtems/src/msgqtranslatereturncode.c, rtems/src/msgqurgent.c, rtems/src/part.c, rtems/src/partcreate.c, rtems/src/partident.c, rtems/src/partmp.c, rtems/src/ratemon.c, rtems/src/region.c, rtems/src/regioncreate.c, rtems/src/regionextend.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionmp.c, rtems/src/regionreturnsegment.c, rtems/src/rtemstimer.c, rtems/src/sem.c, rtems/src/semcreate.c, rtems/src/semident.c, rtems/src/semmp.c, rtems/src/semobtain.c, rtems/src/semtranslatereturncode.c, rtems/src/taskcreate.c, rtems/src/taskgetnote.c, rtems/src/taskident.c, rtems/src/taskinitusers.c, rtems/src/taskmp.c, rtems/src/taskrestart.c, rtems/src/tasks.c, rtems/src/tasksetnote.c, rtems/src/taskstart.c, rtems/src/timerserver.c: Convert to using c99 fixed size types.
  • Property mode set to 100644
File size: 2.3 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-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef __RTEMS_MODES_h
17#define __RTEMS_MODES_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/score/isr.h>
24
25/*
26 *  The following type defines the control block used to manage
27 *  each a mode set.
28 */
29
30typedef uint32_t   Modes_Control;
31
32/*
33 *  The following constants define the individual modes and masks
34 *  which may be used to compose a mode set and to alter modes.
35 */
36
37#define RTEMS_ALL_MODE_MASKS     0x0000ffff
38
39#define RTEMS_DEFAULT_MODES     0x00000000
40#define RTEMS_CURRENT_MODE      0
41
42#define RTEMS_PREEMPT_MASK    0x00000100  /* preemption bit           */
43#define RTEMS_TIMESLICE_MASK  0x00000200  /* timeslice bit            */
44#define RTEMS_ASR_MASK        0x00000400  /* RTEMS_ASR enable bit           */
45#define RTEMS_INTERRUPT_MASK  CPU_MODES_INTERRUPT_MASK
46
47#define RTEMS_PREEMPT      0x00000000     /* enable preemption        */
48#define RTEMS_NO_PREEMPT   0x00000100     /* disable preemption       */
49
50#define RTEMS_NO_TIMESLICE 0x00000000     /* disable timeslicing      */
51#define RTEMS_TIMESLICE    0x00000200     /* enable timeslicing       */
52
53#define RTEMS_ASR          0x00000000     /* enable RTEMS_ASR               */
54#define RTEMS_NO_ASR       0x00000400     /* disable RTEMS_ASR              */
55
56/*
57 *  The number of bits for interrupt levels is CPU dependent.
58 *  RTEMS supports 0 to 256 levels in bits 0-7 of the mode.
59 */
60
61/*PAGE
62 *
63 *  RTEMS_INTERRUPT_LEVEL
64 *
65 *  DESCRIPTION:
66 *
67 *  This function returns the processor dependent interrupt
68 *  level which corresponds to the requested interrupt level.
69 *
70 * NOTE: RTEMS supports 256 interrupt levels using the least
71 *       significant eight bits of MODES.CONTROL.  On any
72 *       particular CPU, fewer than 256 levels may be supported.
73 */
74
75#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \
76  ( (_mode_set) & RTEMS_INTERRUPT_MASK )
77 
78
79#ifndef __RTEMS_APPLICATION__
80#include <rtems/rtems/modes.inl>
81#endif
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif
88/* end of include file */
Note: See TracBrowser for help on using the repository browser.