source: rtems/c/src/exec/rtems/macros/rtems/rtems/asr.inl @ df49c60

4.104.114.84.95
Last change on this file since df49c60 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  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 *  $Id$
14 */
15
16#ifndef __INLINE_ASR_h
17#define __INLINE_ASR_h
18
19#include <rtems/score/isr.h>
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 */
Note: See TracBrowser for help on using the repository browser.