OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [macros/] [rtems/] [rtems/] [modes.inl] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  modes.inl
2
 *
3
 *  This include file contains the macro implementation of the
4
 *  inlined routines in the Mode Handler.
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.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: modes.inl,v 1.2 2001-09-27 11:59:19 chris Exp $
14
 */
15
 
16
#ifndef __MODES_inl
17
#define __MODES_inl
18
 
19
/*PAGE
20
 *
21
 *  _Modes_Mask_changed
22
 *
23
 */
24
 
25
#define _Modes_Mask_changed( _mode_set, _masks ) \
26
   ( (_mode_set) & (_masks) )
27
 
28
/*PAGE
29
 *
30
 *  _Modes_Is_asr_disabled
31
 *
32
 */
33
 
34
#define _Modes_Is_asr_disabled( _mode_set ) \
35
   (((_mode_set) & RTEMS_ASR_MASK) == RTEMS_NO_ASR)
36
 
37
/*PAGE
38
 *
39
 *  _Modes_Is_preempt
40
 *
41
 */
42
 
43
#define _Modes_Is_preempt( _mode_set ) \
44
   ( ( (_mode_set) & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT )
45
 
46
/*PAGE
47
 *
48
 *  _Modes_Is_timeslice
49
 *
50
 */
51
 
52
#define _Modes_Is_timeslice( _mode_set ) \
53
  (((_mode_set) & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE)
54
 
55
/*PAGE
56
 *
57
 *  _Modes_Get_interrupt_level
58
 *
59
 */
60
 
61
#define _Modes_Get_interrupt_level( _mode_set ) \
62
  ( (_mode_set) & RTEMS_INTERRUPT_MASK )
63
 
64
/*PAGE
65
 *
66
 *  _Modes_Set_interrupt_level
67
 *
68
 */
69
 
70
#define _Modes_Set_interrupt_level( _mode_set ) \
71
   _ISR_Set_level( _Modes_Get_interrupt_level( (_mode_set) ) )
72
 
73
/*PAGE
74
 *
75
 *  _Modes_Change
76
 *
77
 */
78
 
79
#define _Modes_Change( _old_mode_set, _new_mode_set, \
80
                       _mask, _out_mode_set, _changed ) \
81
  { Modes_Control _out_mode; \
82
    \
83
    _out_mode         =  (_old_mode_set); \
84
    _out_mode        &= ~(_mask); \
85
    _out_mode        |= (_new_mode_set) & (_mask); \
86
    *(_changed)       = _out_mode ^ (_old_mode_set); \
87
    *(_out_mode_set)  = _out_mode; \
88
  }
89
 
90
#endif
91
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.