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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [rtems/] [macros/] [rtems/] [rtems/] [asr.inl] - Blame information for rev 208

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 158 chris
/*  macros/asr.h
2
 *
3
 *  This include file contains the implemenation of all routines
4
 *  associated with the asynchronous signal handler which are inlined.
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 208 chris
 *  $Id: asr.inl,v 1.2 2001-09-27 11:59:19 chris Exp $
14 158 chris
 */
15
 
16
#ifndef __INLINE_ASR_h
17
#define __INLINE_ASR_h
18
 
19
#include 
20
 
21
/*PAGE
22
 *
23
 *  _ASR_Initialize
24
 *
25
 */
26
 
27
#define _ASR_Initialize( _information ) \
28
{ \
29
  (_information)->is_enabled      = TRUE; \
30
  (_information)->handler         = NULL; \
31
  (_information)->mode_set        = RTEMS_DEFAULT_MODES; \
32
  (_information)->signals_posted  = 0; \
33
  (_information)->signals_pending = 0; \
34
  (_information)->nest_level      = 0; \
35
}
36
 
37
/*PAGE
38
 *
39
 *  _ASR_Swap_signals
40
 *
41
 */
42
 
43
#define _ASR_Swap_signals( _information ) \
44
{ \
45
  rtems_signal_set _signals; \
46
  ISR_Level              _level; \
47
   \
48
  _ISR_Disable( _level ); \
49
    _signals                        = (_information)->signals_pending; \
50
    (_information)->signals_pending = (_information)->signals_posted; \
51
    (_information)->signals_posted  = _signals; \
52
  _ISR_Enable( _level ); \
53
}
54
 
55
/*PAGE
56
 *
57
 *  _ASR_Is_null_handler
58
 *
59
 */
60
 
61
#define _ASR_Is_null_handler( _asr_handler ) \
62
  ( (_asr_handler) == NULL )
63
 
64
/*PAGE
65
 *
66
 *  _ASR_Are_signals_pending
67
 *
68
 */
69
 
70
#define _ASR_Are_signals_pending( _information ) \
71
 ( (_information)->signals_posted != 0 )
72
 
73
/*PAGE
74
 *
75
 *  _ASR_Post_signals
76
 *
77
 */
78
 
79
#define _ASR_Post_signals( _signals, _signal_set ) \
80
  do { \
81
     ISR_Level _level; \
82
     \
83
     _ISR_Disable( _level ); \
84
       *(_signal_set) |= (_signals); \
85
     _ISR_Enable( _level ); \
86
  } while ( 0 )
87
 
88
#endif
89
/* end of include file */

powered by: WebSVN 2.1.0

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